-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1485 from Dignifiedquire/server-api
feat(server): improve public api
- Loading branch information
Showing
5 changed files
with
291 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,26 @@ | ||
// index module | ||
exports.VERSION = require('./constants').VERSION | ||
exports.server = require('./server') | ||
exports.runner = require('./runner') | ||
exports.launcher = require('./launcher') | ||
|
||
var constants = require('./constants') | ||
var Server = require('./server') | ||
var runner = require('./runner') | ||
var launcher = require('./launcher') | ||
|
||
// TODO: remove in 1.0 | ||
var oldServer = { | ||
start: function () { | ||
throw new Error( | ||
'The api interface has changed. Please use \n' + | ||
' server = new Server(config, [done])\n' + | ||
' server.start()\n' + | ||
'instead.' | ||
) | ||
} | ||
} | ||
|
||
module.exports = { | ||
VERSION: constants.VERSION, | ||
Server: Server, | ||
runner: runner, | ||
launcher: launcher, | ||
server: oldServer | ||
} |
Oops, something went wrong.