UNPKG

pooliot-client

Version:
17 lines (14 loc) 439 B
import { logger } from 'nightingale-app-console/src'; import { stop as stopDisplay } from './commands/display'; import { close as clientClose } from './client'; import { childServer } from './fork-server'; export function exit() { logger.warn('exiting...'); Promise.all([childServer.kill(), stopDisplay(), clientClose()]).then(() => { logger.warn('exit !'); process.exit(); }); } process.on('SIGINT', () => { exit(); });