Skip to content

Commit

Permalink
fix: exit server on SIGTERM
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewL246 committed Jul 2, 2024
1 parent 4374a5f commit 73dab86
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
process.title = 'Pretendo - Miiverse';
process.on('SIGTERM', () => {
process.exit(0);
});

import express from 'express';
import morgan from 'morgan';
Expand Down Expand Up @@ -78,4 +81,4 @@ async function main(): Promise<void> {
});
}

main().catch(console.error);
main().catch(console.error);

0 comments on commit 73dab86

Please sign in to comment.