Fix Passenger ESM incompatibility — add server.cjs CJS wrapper

Passenger's node-loader uses require() which cannot load ES modules.
server.cjs is a CommonJS shim that bridges into server.js via dynamic import().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Leon Serfaty
2026-04-26 16:49:13 -04:00
co-authored by Claude Sonnet 4.6
parent e91ff1ce89
commit 8656e6e470
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -16,7 +16,7 @@
"dev:api": "npm run dev -w apps/api",
"build": "npm run build -w apps/web",
"build:check": "npm run build && npm run typecheck",
"start": "node server.js",
"start": "node server.cjs",
"db:generate": "npm run generate -w packages/db",
"db:migrate": "npm run migrate -w packages/db",
"typecheck": "npm run typecheck --workspaces --if-present"