Drop NODE_ENV for explicit config toggles (todo §0.1); app is environment-agnostic

This commit is contained in:
2026-06-15 10:53:33 +02:00
parent 2d43430405
commit a070362649
9 changed files with 79 additions and 37 deletions

View File

@@ -1,10 +1,10 @@
import { createApp } from "./app.ts";
import { loadConfig } from "./config.ts";
const { port } = loadConfig(); // validates the env (incl. prod secrets) — fails loud at boot
const config = loadConfig(); // validates the env (incl. enforced secrets) — fails loud at boot
const server = createApp().listen(port, () => {
console.log(`Listening on http://localhost:${port}`);
const server = createApp({ cache: config.cacheTemplates }).listen(config.port, () => {
console.log(`Listening on http://localhost:${config.port}`);
});
// Drain in-flight requests on container stop instead of cutting them mid-response.