Fix: .env was never actually loaded for local dev
All checks were successful
Docker / build-and-push (push) Successful in 2m8s
All checks were successful
Docker / build-and-push (push) Successful in 2m8s
README said cp .env.example .env then npm run dev, but nothing ever read the file into process.env — no dotenv, no --env-file. This predates the admin UI work; just surfaced by actually trying to run it. Fixed with Node's native --env-file flag on both dev and start (no new dependency). Doesn't affect Docker, which gets its config from docker-compose's environment: block directly, bypassing npm scripts entirely (CMD calls node dist/index.js directly). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "tsx watch src/index.ts",
|
||||
"dev": "tsx watch --env-file=.env src/index.ts",
|
||||
"build": "tsc",
|
||||
"start": "node dist/index.js"
|
||||
"start": "node --env-file=.env dist/index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "^4.19.2",
|
||||
|
||||
Reference in New Issue
Block a user