diff --git a/README.md b/README.md index 429591f..cb6c829 100644 --- a/README.md +++ b/README.md @@ -18,14 +18,34 @@ Little nodejs + mongodb app that I hack together with ChatGPT and Cursor to keep - Version endpoint backed by latest GitHub commit (cached) ## Setup -Config those in your .env file: +Create a `.env` file at the project root (same folder as `package.json`). -**DOG_NAMES=**`woof, WOOF, Woof`     (for "verification")
-**GITHUB_OWNER=**`quoije`     (for version history)
-**GITHUB_REPO=**`oscars-pool`     (for version history)
-**JWT_SECRET=**`RANDOM STRING`     (for authentication token)
-**MONGO_URI=**`mongodb+srv://USER:PASS@cluster0.XXXX.mongodb.net/?retryWrites=true&w=majority&appName=Cluster69`
-**OMDB_API=**`1234567`     (for movie info) +Minimal steps: + +```bash +npm install +node index.js +``` + +Add this to your `.env` (**required**: `MONGO_URI`, `JWT_SECRET`): + +```bash +# required +MONGO_URI=mongodb://127.0.0.1:27017/oscars-pool # MongoDB connection string +JWT_SECRET=replace-with-a-random-string # JWT signing secret (auth) + +# optional +DOG_NAMES=woof,WOOF,Woof # simple registration "verification" +OMDB_API=your_omdb_key # OMDb API key (movie info) +GITHUB_OWNER=quoije # version history +GITHUB_REPO=oscars-pool # version history +``` + +Generate a good `JWT_SECRET`: + +```bash +openssl rand -hex 32 +``` ## Database (MongoDB) 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:PASS@cluster0.XXXX.mongodb.net/?retryWrites=true&w=majority` - Local: `mongodb://127.0.0.1:27017/` - Collections are created/managed automatically from the models in `models/` (e.g. `User`, `Movie`, `Setting`, `PlaybackProgress`). - -run with **node .\index.js**