Configuration
All configuration is environment-variable based. No config files needed.Quick Reference
| Variable | Default | Description |
|---|---|---|
PORT | 3100 | Server port |
NODE_ENV | development | development | staging | production |
MONGODB_URL | — | MongoDB connection string (required) |
REDIS_URL | — | Redis URL (optional, falls back to in-memory) |
RATE_LIMIT_ENABLED | true | Enable rate limiting |
RATE_LIMIT_TTL | 60 | Rate limit window (seconds) |
RATE_LIMIT_MAX | 100 | Max requests per window |
IDEMPOTENCY_ENABLED | true | Enable idempotent API |
IDEMPOTENCY_TTL | 86400 | Idempotency cache TTL (seconds) |
LOG_LEVEL | info | debug | info | warn | error |
LOG_TO_FILE | false | Enable file logging |
LOG_TO_DB | false | Enable MongoDB logging |
DEFAULT_LOCALE | en | Default i18n locale |
SUPPORTED_LOCALES | en,ms | Comma-separated locales |