mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
Refactor server startup in templates to use info callback
This commit is contained in:
@@ -22,10 +22,7 @@
|
|||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
"prepublishOnly": "npm run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": ["dist", "template"],
|
||||||
"dist",
|
|
||||||
"template"
|
|
||||||
],
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@clack/prompts": "^0.10.0",
|
"@clack/prompts": "^0.10.0",
|
||||||
"commander": "^13.1.0",
|
"commander": "^13.1.0",
|
||||||
|
|||||||
@@ -33,10 +33,9 @@ app.get("/healthCheck", (c) => {
|
|||||||
return c.text("OK");
|
return c.text("OK");
|
||||||
});
|
});
|
||||||
|
|
||||||
const port = 3000;
|
|
||||||
console.log(`Server is running on http://localhost:${port}`);
|
|
||||||
|
|
||||||
serve({
|
serve({
|
||||||
fetch: app.fetch,
|
fetch: app.fetch,
|
||||||
port,
|
port: 3000,
|
||||||
|
}, (info) => {
|
||||||
|
console.log(`Server is running on http://localhost:${info.port}`)
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -38,10 +38,9 @@ app.get("/healthCheck", (c) => {
|
|||||||
return c.text("OK");
|
return c.text("OK");
|
||||||
});
|
});
|
||||||
|
|
||||||
const port = 3000;
|
|
||||||
console.log(`Server is running on http://localhost:${port}`);
|
|
||||||
|
|
||||||
serve({
|
serve({
|
||||||
fetch: app.fetch,
|
fetch: app.fetch,
|
||||||
port,
|
port: 3000,
|
||||||
|
}, (info) => {
|
||||||
|
console.log(`Server is running on http://localhost:${info.port}`)
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user