docs: add environment variables documentation and example file for backend setup#711
docs: add environment variables documentation and example file for backend setup#711firoziya wants to merge 3 commits into
Conversation
✅ Deploy Preview for github-spy ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThis PR adds documentation and a template for backend environment variables to improve contributor onboarding. A new README section lists required and optional configuration variables alongside their defaults, and a corresponding ChangesEnvironment Variables Setup
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
backend/.env.example (1)
14-14: 💤 Low valueAdd trailing newline at end of file.
The file should end with a newline character per POSIX convention. This prevents diff noise and potential linter warnings.
📝 Proposed fix
# Log Level (optional: debug, info, warn, error) LOG_LEVEL=debug +🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@backend/.env.example` at line 14, The file backend/.env.example is missing a trailing newline; update the file so it ends with a single newline character (ensure your editor saves a newline at EOF or add one in your commit) to satisfy POSIX conventions and remove diff/linter noise.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@backend/.env.example`:
- Line 14: The file backend/.env.example is missing a trailing newline; update
the file so it ends with a single newline character (ensure your editor saves a
newline at EOF or add one in your commit) to satisfy POSIX conventions and
remove diff/linter noise.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: f65f2cd9-36c0-45b5-8df5-3081ad507967
📒 Files selected for processing (2)
README.mdbackend/.env.example
Related Issue
Description
This PR addresses the missing documentation for backend environment variables, which currently causes setup friction for new contributors.
Changes Made:
README.md: Added a dedicated "🔐 Environment Variables" section under the Setup Guide, including a table explaining each variable (MONGO_URI,SESSION_SECRET,PORT,LOG_LEVEL).backend/.env.example: Provides a template file with placeholder values that contributors can copy to.env.These changes align with the issue's suggestions and will significantly improve the local development setup experience.
How Has This Been Tested?
backend/server.jsandbackend/config/passportConfig.js..env.exampleto.env, populating dummy values, and successfully starting the backend server.Screenshots (if applicable)
New README Section Preview:

New
.env.examplefile: