feat: dynamic port

This commit is contained in:
Max Koon
2025-10-20 10:39:20 -04:00
parent 1e840ce0ce
commit 763322a492
3 changed files with 3 additions and 9 deletions

View File

@@ -47,7 +47,7 @@ app.get("/", (c) => c.text("OK"));
serve(
{
fetch: app.fetch,
port: 3000,
port: process.env.PORT ? parseInt(process.env.PORT) : 3000,
},
(info) => {
console.log(`Server is running on ${info.address}:${info.port}`);