Spaces:
Running
Running
File size: 687 Bytes
3d97d52 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
import { createApp } from "./server.js";
const app = createApp();
const port = process.env.PORT || 3000;
// Start server
app.listen(port, () => {
console.log(`π Server started at ${new Date().toISOString()}`);
console.log(`π Server is running on http://localhost:${port}`);
console.log("β".repeat(60));
});
// Graceful shutdown logging
process.on("SIGINT", () => {
console.log("β".repeat(60));
console.log(`π Server shutting down at ${new Date().toISOString()}`);
process.exit(0);
});
process.on("SIGTERM", () => {
console.log("β".repeat(60));
console.log(`π Server shutting down at ${new Date().toISOString()}`);
process.exit(0);
});
export default app;
|