Readme env file setup #23

Merged
quoije merged 5 commits from cursor/readme-env-file-setup-eda9 into 2026 2025-12-21 14:33:37 -05:00
Showing only changes of commit 253ac63fe9 - Show all commits
+21 -3
View File
@@ -18,7 +18,16 @@ Little nodejs + mongodb app that I hack together with ChatGPT and Cursor to keep
- Version endpoint backed by latest GitHub commit (cached) - Version endpoint backed by latest GitHub commit (cached)
## Setup ## Setup
Config those in your .env file: Create a `.env` file at the project root (same folder as `package.json`). It’s not committed to git—each machine needs its own values.
Minimal steps:
```bash
npm install
node index.js
```
Configure these in your `.env` file (**required**: `MONGO_URI`, `JWT_SECRET`):
**DOG_NAMES=**`woof, WOOF, Woof` &nbsp;&nbsp;&nbsp;&nbsp;(for "verification")<br> **DOG_NAMES=**`woof, WOOF, Woof` &nbsp;&nbsp;&nbsp;&nbsp;(for "verification")<br>
**GITHUB_OWNER=**`quoije` &nbsp;&nbsp;&nbsp;&nbsp;(for version history)<br> **GITHUB_OWNER=**`quoije` &nbsp;&nbsp;&nbsp;&nbsp;(for version history)<br>
@@ -27,6 +36,17 @@ Config those in your .env file:
**MONGO_URI=**`mongodb+srv://USER:[email protected]/?retryWrites=true&w=majority&appName=Cluster69`<br> **MONGO_URI=**`mongodb+srv://USER:[email protected]/?retryWrites=true&w=majority&appName=Cluster69`<br>
**OMDB_API=**`1234567` &nbsp;&nbsp;&nbsp;&nbsp;(for movie info) **OMDB_API=**`1234567` &nbsp;&nbsp;&nbsp;&nbsp;(for movie info)
Example `.env`:
```bash
MONGO_URI=mongodb://127.0.0.1:27017/oscars-pool
JWT_SECRET=change-me
DOG_NAMES=woof,WOOF,Woof
OMDB_API=your_omdb_key
GITHUB_OWNER=quoije
GITHUB_REPO=oscars-pool
```
## Database (MongoDB) ## Database (MongoDB)
This app uses **MongoDB** via Mongoose. Provide a connection string in `MONGO_URI`. This app uses **MongoDB** via Mongoose. Provide a connection string in `MONGO_URI`.
@@ -35,5 +55,3 @@ This app uses **MongoDB** via Mongoose. Provide a connection string in `MONGO_UR
- Atlas: `mongodb+srv://USER:[email protected]/<dbName>?retryWrites=true&w=majority` - Atlas: `mongodb+srv://USER:[email protected]/<dbName>?retryWrites=true&w=majority`
- Local: `mongodb://127.0.0.1:27017/<dbName>` - Local: `mongodb://127.0.0.1:27017/<dbName>`
- Collections are created/managed automatically from the models in `models/` (e.g. `User`, `Movie`, `Setting`, `PlaybackProgress`). - Collections are created/managed automatically from the models in `models/` (e.g. `User`, `Movie`, `Setting`, `PlaybackProgress`).
run with **node .\index.js**