build(web): node-server preset (apt-native runtime, no bun dependency)
Switch the Nitro build preset from `bun` to `node-server` so the built .output/server is a standalone HTTP server runnable by apt-native `node` (validated: `node .output/server/index.mjs` → Listening, /login 200 on node v25.9.0). This lets the upcoming punktfunk-web .deb depend on `nodejs (>= 20)` instead of vendoring the bun binary. CI still BUILDS with bun; only the runtime target changes, and bun still runs a node-server build, so existing `bun run .output/server/index.mjs` deployments keep working. `vite dev` is unaffected. Prereq for bundling the web console into the apt install. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+5
-1
@@ -41,7 +41,11 @@ export default defineConfig({
|
||||
// proxies to the management host injecting the bearer token server-side) — NOT a static
|
||||
// routeRule, so the proxy runs behind the login gate and reads env at runtime.
|
||||
nitroV2Plugin({
|
||||
preset: 'bun',
|
||||
// node-server (not bun): a STANDALONE node HTTP server (`node .output/server/index.mjs`
|
||||
// listens — the plain `node` preset only exports a handler). Lets the bundled punktfunk-web
|
||||
// .deb depend on apt-native `nodejs (>= 20)` instead of vendoring bun. CI still BUILDS with
|
||||
// bun; only the runtime target changes. (dev `vite dev` is unaffected.)
|
||||
preset: 'node-server',
|
||||
compatibilityDate: '2026-06-10',
|
||||
// Scan server/{middleware,routes} for the auth gate + the /api proxy.
|
||||
scanDirs: [serverDir],
|
||||
|
||||
Reference in New Issue
Block a user