index.js 871 B

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