1 | 'use strict';
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.exit = exit;
|
7 |
|
8 | var _nightingaleAppConsole = require('nightingale-app-console');
|
9 |
|
10 | var _display = require('./commands/display');
|
11 |
|
12 | var _client = require('./client');
|
13 |
|
14 | var _forkServer = require('./fork-server');
|
15 |
|
16 | function 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 |
|
24 | process.on('SIGINT', () => {
|
25 | exit();
|
26 | });
|
27 |
|
\ | No newline at end of file |