From 6af1bcbb59fa4868fd712e06399f5972f0fc2a90 Mon Sep 17 00:00:00 2001 From: shrushtigaynar Date: Tue, 2 Jun 2026 19:29:07 +0530 Subject: [PATCH] docs: add environment variable documentation --- .env.example | 9 +++++++++ README.md | 21 +++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..02028e54 --- /dev/null +++ b/.env.example @@ -0,0 +1,9 @@ +PORT=5000 + +MONGO_URI=your_mongodb_connection_string + +SESSION_SECRET=your_session_secret + +NODE_ENV=development + +LOG_LEVEL=debug \ No newline at end of file diff --git a/README.md b/README.md index a747b53a..53644139 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,27 @@ Install all required dependencies: npm install npm install --save-dev jasmine @types/jasmine supertest express-session passport passport-local bcryptjs ``` +## Environment Variables + +Create a `.env` file in the project root and add the following variables: + +| Variable | Description | +|----------|-------------| +| PORT | Port on which the backend server runs | +| MONGO_URI | MongoDB connection string | +| SESSION_SECRET | Secret key used for session management | +| NODE_ENV | Application environment | +| LOG_LEVEL | Logging level | + +### Example + +```env +PORT=5000 +MONGO_URI=your_mongodb_connection_string +SESSION_SECRET=your_session_secret +NODE_ENV=development +LOG_LEVEL=debug +``` ### Running the Tests 1. **Start MongoDB** (if not already running):