From c6e24a9f79c2dfdb9d0bfa00afaf3fa7d1717557 Mon Sep 17 00:00:00 2001 From: Yash Kumar <219265056+firoziya@users.noreply.github.com> Date: Thu, 4 Jun 2026 16:25:07 +0530 Subject: [PATCH 1/3] Create .env.example --- backend/.env.example | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 backend/.env.example 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 From 66bcc3eb731ad8e8f77cddb2af2b82b45ee556a0 Mon Sep 17 00:00:00 2001 From: Yash Kumar <219265056+firoziya@users.noreply.github.com> Date: Thu, 4 Jun 2026 16:26:23 +0530 Subject: [PATCH 2/3] Update README.md --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index a747b53a..2d23ec6e 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,19 @@ This project uses the Jasmine framework for backend unit and integration tests. - **Node.js** and **npm** installed - **MongoDB** running locally (default: `mongodb://127.0.0.1:27017`) +## ๐Ÿ” 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. + ### Installation Install all required dependencies: ```sh From fc67e0eb50d0ce3ac56b1bb4c07d4a7ac667cc6c Mon Sep 17 00:00:00 2001 From: Yash Kumar <219265056+firoziya@users.noreply.github.com> Date: Thu, 4 Jun 2026 16:27:09 +0530 Subject: [PATCH 3/3] Update README.md --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 2d23ec6e..6282b986 100644 --- a/README.md +++ b/README.md @@ -63,17 +63,6 @@ $ npm i $ npm start ``` -## ๐Ÿงช Backend Unit & Integration Testing with Jasmine - -This project uses the Jasmine framework for backend unit and integration tests. The tests cover: -- User model (password hashing, schema, password comparison) -- Authentication routes (signup, login, logout) -- Passport authentication logic (via integration tests) - -### Prerequisites -- **Node.js** and **npm** installed -- **MongoDB** running locally (default: `mongodb://127.0.0.1:27017`) - ## ๐Ÿ” Environment Variables Create a `.env` file inside the `backend/` directory with the following variables: @@ -87,6 +76,17 @@ Create a `.env` file inside the `backend/` directory with the following variable > **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: +- User model (password hashing, schema, password comparison) +- Authentication routes (signup, login, logout) +- Passport authentication logic (via integration tests) + +### Prerequisites +- **Node.js** and **npm** installed +- **MongoDB** running locally (default: `mongodb://127.0.0.1:27017`) + ### Installation Install all required dependencies: ```sh