1 | 'use strict'
|
2 |
|
3 | const constants = require('./constants')
|
4 | const Server = require('./server')
|
5 | const runner = require('./runner')
|
6 | const stopper = require('./stopper')
|
7 | const launcher = require('./launcher')
|
8 | const cfg = require('./config')
|
9 |
|
10 |
|
11 | const oldServer = {
|
12 | start: function (cliOptions, done) {
|
13 | console.error('WARN `start` method is deprecated since 0.13. It will be removed in 0.14. Please use \n' +
|
14 | ' server = new Server(config, [done])\n' +
|
15 | ' server.start()\n' +
|
16 | 'instead.')
|
17 | const server = new Server(cliOptions, done)
|
18 | server.start()
|
19 | }
|
20 | }
|
21 |
|
22 | module.exports = {
|
23 | constants: constants,
|
24 | VERSION: constants.VERSION,
|
25 | Server: Server,
|
26 | runner: runner,
|
27 | stopper: stopper,
|
28 | launcher: launcher,
|
29 | config: { parseConfig: cfg.parseConfig },
|
30 | server: oldServer
|
31 | }
|