feat: server port configurable via PORT env (#2097)

This commit is contained in:
Ephraim Duncan
2025-10-27 06:24:24 +00:00
committed by GitHub
parent 5cdd7f8623
commit 35250fa308
6 changed files with 11 additions and 3 deletions

View File

@ -30,4 +30,6 @@ server.use(
const handler = handle(build, server);
serve({ fetch: handler.fetch, port: 3000 });
const port = parseInt(process.env.PORT || '3000', 10);
serve({ fetch: handler.fetch, port });