mirror of
https://github.com/tale/headplane.git
synced 2026-07-26 07:48:14 +00:00
chore: add sig handlers for the server
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user