diff --git a/README.md b/README.md index a747b53a..6282b986 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,19 @@ $ npm i $ npm start ``` +## ๐Ÿ” Environment Variables + +Create a `.env` file inside the `backend/` directory with the following variables: + +| Variable | Description | Default | +|----------|-------------|---------| +| `MONGO_URI` | MongoDB connection string | `mongodb://127.0.0.1:27017/github_tracker` | +| `SESSION_SECRET` | Secret key for session encryption | (required) | +| `PORT` | Backend server port | `5000` | +| `LOG_LEVEL` | Winston logging level | `debug` (dev) / `info` (prod) | + +> **Note**: Copy `backend/.env.example` to `backend/.env` and update the values as needed. + ## ๐Ÿงช Backend Unit & Integration Testing with Jasmine This project uses the Jasmine framework for backend unit and integration tests. The tests cover: diff --git a/backend/.env.example b/backend/.env.example new file mode 100644 index 00000000..45ca9fcc --- /dev/null +++ b/backend/.env.example @@ -0,0 +1,13 @@ +# Backend Environment Variables + +# MongoDB Connection URI (required) +MONGO_URI=mongodb://127.0.0.1:27017/github_tracker + +# Session Secret for express-session (required - use a strong random string) +SESSION_SECRET=your_super_secret_key_change_this_in_production + +# Server Port (optional, defaults to 5000) +PORT=5000 + +# Log Level (optional: debug, info, warn, error) +LOG_LEVEL=debug