Spaces:
Sleeping
Sleeping
Add .env.example documenting environment variables
Browse filesTrack the env template (negate the .env.* ignore rule) so contributors
have a reference for ANTHROPIC_API_KEY, ACCESS_CODE, PORT, and rate limits.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- .env.example +17 -0
- .gitignore +1 -0
.env.example
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copy to .env for local dev (never commit the real .env — it's gitignored).
|
| 2 |
+
# On Render/Fly these are set as dashboard secrets, not from a file.
|
| 3 |
+
|
| 4 |
+
# Required for live model answers (without it, the safety gate still works
|
| 5 |
+
# but SAFE questions return a "no key configured" message).
|
| 6 |
+
ANTHROPIC_API_KEY=sk-ant-...
|
| 7 |
+
|
| 8 |
+
# Shared access code for the demo gate. When set, /api/chat requires it.
|
| 9 |
+
# Leave empty/unset to run fully open (local dev only).
|
| 10 |
+
ACCESS_CODE=changeme
|
| 11 |
+
|
| 12 |
+
# Port the server listens on (Render/Fly inject this automatically).
|
| 13 |
+
PORT=8100
|
| 14 |
+
|
| 15 |
+
# Rate limiting (per IP). Defaults shown; override to taste.
|
| 16 |
+
RATE_MAX=20
|
| 17 |
+
RATE_WINDOW_MS=60000
|
.gitignore
CHANGED
|
@@ -2,6 +2,7 @@ node_modules/
|
|
| 2 |
npm-debug.log*
|
| 3 |
.env
|
| 4 |
.env.*
|
|
|
|
| 5 |
*.log
|
| 6 |
server.out.log
|
| 7 |
server.err.log
|
|
|
|
| 2 |
npm-debug.log*
|
| 3 |
.env
|
| 4 |
.env.*
|
| 5 |
+
!.env.example
|
| 6 |
*.log
|
| 7 |
server.out.log
|
| 8 |
server.err.log
|