-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add public-samples/benchmarks-website---replit-yxxvno/src/backend/.en…
…v.example
- Loading branch information
1 parent
3b85f2c
commit 3a0ae05
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Server Configuration | ||
# ------------------- | ||
NODE_ENV=development # Application environment (development/staging/production) | ||
PORT=3000 # Server port number for the application | ||
API_VERSION=v1 # API version for routing | ||
CORS_ORIGIN=http://localhost:5173 # Allowed CORS origin for frontend | ||
|
||
# Database Configuration (PostgreSQL v14+) | ||
# -------------------------------------- | ||
DB_HOST=localhost # PostgreSQL database host address | ||
DB_PORT=5432 # PostgreSQL database port number | ||
DB_NAME=saas_metrics # PostgreSQL database name | ||
DB_USER=postgres # PostgreSQL database user | ||
DB_PASSWORD=your_secure_password # PostgreSQL database password (min 12 chars, mixed case, numbers, special chars) | ||
DB_SSL=true # Enable SSL for database connection (required in production) | ||
DB_SSL_REJECT_UNAUTHORIZED=true # Reject unauthorized SSL certificates | ||
DB_POOL_MIN=2 # Minimum database connection pool size | ||
DB_POOL_MAX=10 # Maximum database connection pool size | ||
DB_TIMEOUT=30000 # Database query timeout in milliseconds | ||
|
||
# Redis Cache Configuration (Redis v6.2+) | ||
# ------------------------------------ | ||
REDIS_HOST=localhost # Redis cache host address | ||
REDIS_PORT=6379 # Redis cache port number | ||
REDIS_PASSWORD=your_redis_password # Redis cache password (min 12 chars, mixed case, numbers, special chars) | ||
REDIS_TTL=900 # Redis cache TTL in seconds (15 minutes) | ||
REDIS_MAX_RETRIES=3 # Maximum Redis connection retry attempts | ||
REDIS_RETRY_DELAY=1000 # Delay between Redis retry attempts in milliseconds | ||
|
||
# Authentication Configuration | ||
# -------------------------- | ||
# Google OAuth Settings | ||
GOOGLE_CLIENT_ID=your_google_client_id # Google OAuth client ID from Google Cloud Console | ||
GOOGLE_CLIENT_SECRET=your_google_client_secret # Google OAuth client secret from Google Cloud Console | ||
GOOGLE_CALLBACK_URL=http://localhost:3000/api/v1/auth/google/callback # Google OAuth callback URL | ||
|
||
# JWT Configuration | ||
JWT_SECRET=your_jwt_secret_key # JWT signing secret key (min 32 chars, high entropy) | ||
JWT_EXPIRES_IN=1800 # JWT token expiry in seconds (30 minutes) | ||
JWT_REFRESH_SECRET=your_jwt_refresh_secret # JWT refresh token secret key (different from JWT_SECRET) | ||
JWT_REFRESH_EXPIRES_IN=604800 # JWT refresh token expiry in seconds (7 days) | ||
|
||
# Session Configuration | ||
SESSION_NAME=saas_metrics_sid # Session cookie name | ||
SESSION_SECRET=your_session_secret # Session encryption secret (min 32 chars, high entropy) | ||
SESSION_TIMEOUT=3600000 # Session timeout in milliseconds (1 hour) | ||
|
||
# NOTE: This is an example configuration file. In production: | ||
# 1. Use strong, unique passwords and secrets | ||
# 2. Enable SSL/TLS for all connections | ||
# 3. Store sensitive values in a secure vault | ||
# 4. Never commit actual .env files to version control |