Fix: .env was never actually loaded for local dev
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:
Fredrik Johansson
2026-07-10 15:49:56 +02:00
parent b83d7aec01
commit edfa12b8e9
2 changed files with 4 additions and 2 deletions

View File

@@ -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",