responses.js / src /index.ts
Wauplin's picture
Wauplin HF Staff
Upload folder using huggingface_hub
3d97d52 verified
raw
history blame contribute delete
687 Bytes
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;