chore: add sig handlers for the server

This commit is contained in:
Aarnav Tale
2025-10-19 15:29:40 -04:00
parent 6eabfb7610
commit f66f778398
+10
View File
@@ -106,3 +106,13 @@ export default createHonoServer({
log.info('server', 'Running on %s:%s', info.address, info.port);
},
});
process.on('SIGINT', () => {
log.info('server', 'Received SIGINT, shutting down...');
process.exit(0);
});
process.on('SIGTERM', () => {
log.info('server', 'Received SIGTERM, shutting down...');
process.exit(0);
});