diff --git a/index.ts b/index.ts index 0d8433b..9b7ac25 100644 --- a/index.ts +++ b/index.ts @@ -1,4 +1,8 @@ import { run } from 'probot'; import appFn from './appFn'; -run(appFn); +run(appFn).then((server) => { + process.on('SIGTERM', async () => { + await server.stop(); + }); +});