Spaces:
Sleeping
Sleeping
Download .env.example from dangkhoa2016/Nodejs-JSON-API-Server: direct link, hf CLI and curl.
- Browser
- Download file 1.77 kB
-
https://huggingface.co/spaces/dangkhoa2016/Nodejs-JSON-API-Server/resolve/42e30c2fc13d198cc76d79446c2a4308bbca4162/.env.example
- Command line
-
hf download hf://spaces/dangkhoa2016/Nodejs-JSON-API-Server@42e30c2fc13d198cc76d79446c2a4308bbca4162/.env.example
-
curl -L -o .env.example https://huggingface.co/spaces/dangkhoa2016/Nodejs-JSON-API-Server/resolve/42e30c2fc13d198cc76d79446c2a4308bbca4162/.env.example
1.77 kB
| # json-api-server configuration | |
| # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| # Env files live at project root (loaded by bin/start.js via dotenv). | |
| # | |
| # Loading order (lowest β highest priority): | |
| # 1. .env.{NODE_ENV} β environment-specific overrides | |
| # 2. .env β base defaults | |
| # 3. System env vars β highest priority (e.g. PORT=5000 node bin/start.js) | |
| # | |
| # NODE_ENV mapping: | |
| # development β .env.dev or .env.development | |
| # test β .env.test | |
| # production β .env.prod or .env.production | |
| # Server | |
| PORT=3000 | |
| # SQLite database path (relative to project root) | |
| DB_PATH=./storage/data.db | |
| # Redis (optional β rate limiting falls back to in-memory if unavailable) | |
| # Option A: connection URL (takes priority over individual settings below) | |
| # Useful for cloud providers (Upstash, Redis Cloud, etc.) | |
| # REDIS_URL=redis://user:password@host:6379/0 | |
| # Option B: individual settings | |
| REDIS_HOST=127.0.0.1 | |
| REDIS_PORT=6379 | |
| REDIS_DB=0 | |
| # REDIS_PASSWORD=your-password | |
| # Admin authentication key | |
| # Set to enable protected admin routes (/api/admin/*) | |
| ADMIN_KEY=your-secret-admin-key | |
| # Seed data source (JSONPlaceholder-compatible API) | |
| # Override to use a different data source for seeding | |
| # SEED_API_BASE_URL=https://jsonplaceholder.typicode.com | |
| # Request body size limit (bytes, default 1 MB) | |
| # MAX_BODY_SIZE=1048576 | |
| # Default page size for pagination | |
| # DEFAULT_PAGE_SIZE=10 | |
| # Debug: log all SQL queries to stderr | |
| # DEBUG_SQL=true | |
| # Rate limiting | |
| RATE_LIMIT_ENABLED=true | |
| RATE_LIMIT_MAX=100 | |
| RATE_LIMIT_WINDOW_MS=60000 | |