mirror of
https://github.com/CJackHwang/ds2api.git
synced 2026-05-04 00:15:28 +08:00
55 lines
2.0 KiB
Plaintext
55 lines
2.0 KiB
Plaintext
# DS2API environment template (Go runtime)
|
|
# Copy this file to .env and adjust values.
|
|
# Updated: 2026-02
|
|
|
|
# ---------------------------------------------------------------
|
|
# Runtime
|
|
# ---------------------------------------------------------------
|
|
# HTTP listen port (default: 5001)
|
|
PORT=5001
|
|
|
|
# Log level: DEBUG | INFO | WARN | ERROR
|
|
LOG_LEVEL=INFO
|
|
|
|
# ---------------------------------------------------------------
|
|
# Admin auth
|
|
# ---------------------------------------------------------------
|
|
# Admin key for /admin login and protected admin APIs.
|
|
# Default is "admin" when unset, but setting it explicitly is recommended.
|
|
DS2API_ADMIN_KEY=admin
|
|
|
|
# Optional JWT signing secret for admin token.
|
|
# Defaults to DS2API_ADMIN_KEY when unset.
|
|
# DS2API_JWT_SECRET=change-me
|
|
|
|
# Optional admin JWT validity in hours (default: 24)
|
|
# DS2API_JWT_EXPIRE_HOURS=24
|
|
|
|
# ---------------------------------------------------------------
|
|
# Config source (choose one)
|
|
# ---------------------------------------------------------------
|
|
# Option A: config file path (local/dev recommended)
|
|
# DS2API_CONFIG_PATH=config.json
|
|
|
|
# Option B: JSON string
|
|
# DS2API_CONFIG_JSON={"keys":["your-api-key"],"accounts":[{"email":"user@example.com","password":"xxx","token":""}]}
|
|
|
|
# Option C: Base64 encoded JSON (recommended for Vercel env var)
|
|
# DS2API_CONFIG_JSON=eyJrZXlzIjpbInlvdXItYXBpLWtleSJdLCJhY2NvdW50cyI6W3siZW1haWwiOiJ1c2VyQGV4YW1wbGUuY29tIiwicGFzc3dvcmQiOiJ4eHgiLCJ0b2tlbiI6IiJ9XX0=
|
|
|
|
# ---------------------------------------------------------------
|
|
# Paths (optional)
|
|
# ---------------------------------------------------------------
|
|
# WASM file used for PoW solving
|
|
# DS2API_WASM_PATH=sha3_wasm_bg.7b9ca65ddd.wasm
|
|
|
|
# Built admin static assets directory
|
|
# DS2API_STATIC_ADMIN_DIR=static/admin
|
|
|
|
# ---------------------------------------------------------------
|
|
# Vercel sync integration (optional)
|
|
# ---------------------------------------------------------------
|
|
# VERCEL_TOKEN=your-vercel-token
|
|
# VERCEL_PROJECT_ID=prj_xxxxxxxxxxxx
|
|
# VERCEL_TEAM_ID=team_xxxxxxxxxxxx
|