-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
docs: add environment variables reference guide #3539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Environment Variables | ||
|
|
||
| This document describes the environment variables used by Checkmate server. | ||
|
|
||
| Copy `server/.env.example` to `server/.env` and fill in your values. | ||
|
|
||
| ## Required Variables | ||
|
|
||
| | Variable | Description | Example | | ||
| |----------|-------------|---------| | ||
| | `DB_CONNECTION_STRING` | MongoDB connection string | `mongodb://localhost:27017/uptime_db` | | ||
| | `JWT_SECRET` | Secret key for JWT tokens | `my_secret` | | ||
|
|
||
| ## Optional Variables | ||
|
|
||
| | Variable | Description | Default | | ||
| |----------|-------------|---------| | ||
| | `NODE_ENV` | Application environment | `development` | | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing |
||
| | `LOG_LEVEL` | Logging level | `debug` | | ||
| | `TOKEN_TTL` | JWT token expiry time | `99d` | | ||
| | `CLIENT_HOST` | Frontend URL | `http://localhost:5173` | | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| | `ORIGIN` | Allowed CORS origin | `localhost` | | ||
|
|
||
| ## Notes | ||
|
|
||
| - The server reads these variables from `server/.env` | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All vars are read from |
||
| - `JWT_SECRET` should be a strong, unique value in production | ||
| - `TOKEN_TTL` accepts any format valid for `ms` (e.g., `1h`, `7d`, `99d`) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing the required client env vars
VITE_APP_API_BASE_URLVITE_APP_CLIENT_HOST