63 lines
1.8 KiB
Bash
63 lines
1.8 KiB
Bash
# ==============================================
|
|
# SerpentRace Backend Environment Configuration
|
|
# ==============================================
|
|
# Copy this file to .env and fill in your values
|
|
|
|
# APPLICATION CONFIGURATION
|
|
NODE_ENV=development
|
|
PORT=3000
|
|
APP_BASE_URL=http://localhost:3000
|
|
|
|
# DATABASE CONFIGURATION (PostgreSQL)
|
|
DB_HOST=localhost
|
|
DB_PORT=5432
|
|
DB_NAME=serpentrace
|
|
DB_USERNAME=postgres
|
|
DB_PASSWORD=your_db_password
|
|
|
|
# REDIS CONFIGURATION
|
|
REDIS_HOST=localhost
|
|
REDIS_PORT=6379
|
|
REDIS_URL=redis://localhost:6379
|
|
|
|
# JWT AUTHENTICATION CONFIGURATION
|
|
JWT_SECRET=your-super-secure-secret-key-here
|
|
JWT_REFRESH_SECRET=your-super-secure-refresh-secret-key-here
|
|
|
|
# Access Token Expiry (choose ONE option, priority order listed):
|
|
JWT_ACCESS_TOKEN_EXPIRY=1800 # Seconds (recommended for production)
|
|
# JWT_ACCESS_TOKEN_EXPIRATION=30m # Duration string (user-friendly)
|
|
# JWT_EXPIRY=1800 # Legacy: seconds
|
|
# JWT_EXPIRATION=30m # Legacy: duration string
|
|
|
|
# Refresh Token Expiry (choose ONE option, priority order listed):
|
|
JWT_REFRESH_TOKEN_EXPIRY=604800 # Seconds (7 days)
|
|
# JWT_REFRESH_TOKEN_EXPIRATION=7d # Duration string (recommended)
|
|
# JWT_REFRESH_EXPIRATION=7d # Legacy: duration string
|
|
|
|
# Cookie Names (optional)
|
|
JWT_COOKIE_NAME=auth_token
|
|
JWT_REFRESH_COOKIE_NAME=refresh_token
|
|
|
|
# Legacy JWT Configuration (deprecated - use above options)
|
|
# JWT_EXPIRY=86400
|
|
# JWT_EXPIRATION=24h
|
|
GAME_TOKEN_EXPIRY=86400
|
|
|
|
# EMAIL SERVICE CONFIGURATION
|
|
EMAIL_HOST=smtp.gmail.com
|
|
EMAIL_PORT=587
|
|
EMAIL_USER=your_email@domain.com
|
|
EMAIL_PASS=your_email_password
|
|
EMAIL_FROM=noreply@serpentrace.com
|
|
|
|
# CHAT SYSTEM CONFIGURATION
|
|
CHAT_INACTIVITY_TIMEOUT_MINUTES=30
|
|
CHAT_MAX_MESSAGES_PER_USER=100
|
|
CHAT_MESSAGE_CLEANUP_WEEKS=4
|
|
|
|
# GAME CONFIGURATION
|
|
MAX_SPECIAL_FIELDS_PERCENTAGE=67
|
|
MAX_GENERATION_TIME_SECONDS=20
|
|
GENERATION_ERROR_TOLERANCE=15
|