Refactor server startup in templates to use info callback

This commit is contained in:
Aman Varshney
2025-03-23 12:02:16 +05:30
parent b10dbddb5c
commit 7d3e1e3ef7
3 changed files with 7 additions and 12 deletions

View File

@@ -38,10 +38,9 @@ app.get("/healthCheck", (c) => {
return c.text("OK");
});
const port = 3000;
console.log(`Server is running on http://localhost:${port}`);
serve({
fetch: app.fetch,
port,
port: 3000,
}, (info) => {
console.log(`Server is running on http://localhost:${info.port}`)
});