fix: allow dynamic server port via environment variable (#530)

This commit is contained in:
Giulio Librando
2026-02-11 18:06:23 +01:00
committed by GitHub
parent 8aa23c75aa
commit d291f049b8

View File

@@ -65,7 +65,7 @@ if (process.env.NODE_ENV !== "production") {
});
}
app.listen(3000);
app.listen(process.env.PORT || 3000);
console.log(`🦊 Elysia is running at http://${app.server?.hostname}:${app.server?.port}${WEBROOT}`);