mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-28 22:00:51 +00:00
14 lines
297 B
TypeScript
14 lines
297 B
TypeScript
import { cleanup as wsCleanup } from "#dynamic/routers/ws";
|
|
|
|
async function cleanup() {
|
|
await wsCleanup();
|
|
|
|
process.exit(0);
|
|
}
|
|
|
|
export async function initCleanup() {
|
|
// Handle process termination
|
|
process.on("SIGTERM", () => cleanup());
|
|
process.on("SIGINT", () => cleanup());
|
|
}
|