Skip to content

Commit

Permalink
refactor(express): convert exports to getters
Browse files Browse the repository at this point in the history
BREAKING CHANGE: remove legacy startServer export
  • Loading branch information
dmbch committed Feb 14, 2018
1 parent 482279d commit d11c9d5
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions packages/express/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
'use strict';

var utils = require('./lib/utils');
var createApp = require('./lib/app');

module.exports = {
module.exports = exports = {
runServer: function runServer(options, callback) {
utils.run(createApp(options), callback);
return exports.utils.run(exports.createApp(options), callback);
},
get createApp() {
return require('./lib/app');
},
startServer: function(callback) {
module.exports.runServer({}, callback);
get utils() {
return require('./lib/utils');
},
createApp: createApp,
utils: utils,
};

0 comments on commit d11c9d5

Please sign in to comment.