UNPKG

626 BJavaScriptView Raw
1'use strict';
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.exit = exit;
7
8var _nightingaleAppConsole = require('nightingale-app-console');
9
10var _display = require('./commands/display');
11
12var _client = require('./client');
13
14var _forkServer = require('./fork-server');
15
16function exit() {
17 _nightingaleAppConsole.logger.warn('exiting...');
18 Promise.all([_forkServer.childServer.kill(), (0, _display.stop)(), (0, _client.close)()]).then(() => {
19 _nightingaleAppConsole.logger.warn('exit !');
20 process.exit();
21 });
22}
23
24process.on('SIGINT', () => {
25 exit();
26});
27//# sourceMappingURL=index.js.map
\No newline at end of file