Allow changing port via env

This commit is contained in:
Lucas Winther committed 2026-07-10 05:38:00 +02:00
1 parent c2de4241a4
commit 15bf14728a
3 files changed
+8 -5

No files matched your search

+4 -3
View File
@@ -189,9 +189,10 @@ async function developmentServeOptions(): Promise<ServeOptions> {
// ---------------------------------------------------------------------------
const server = serve(
IS_PRODUCTION ? await productionServeOptions() : await developmentServeOptions(),
);
const options = IS_PRODUCTION ? await productionServeOptions() : await developmentServeOptions();
options.port = process.env.PORT || 3000;
const server = serve(options);
console.log(
`Server running at ${server.url} (${IS_PRODUCTION ? "production, serving dist/" : "development"})`,