Refactor: Improve README setup instructions
Co-authored-by: mathieumoran1 <[email protected]>
This commit is contained in:
co-authored by
mathieumoran1
parent
0fe87e1971
commit
253ac63fe9
@@ -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` (for "verification")<br>
|
**DOG_NAMES=**`woof, WOOF, Woof` (for "verification")<br>
|
||||||
**GITHUB_OWNER=**`quoije` (for version history)<br>
|
**GITHUB_OWNER=**`quoije` (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` (for movie info)
|
**OMDB_API=**`1234567` (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**
|
|
||||||
|
|||||||
Reference in New Issue
Block a user