diff --git a/core/boot.js b/core/boot.js index ba2a6c881d..4c3a60d4a4 100644 --- a/core/boot.js +++ b/core/boot.js @@ -251,8 +251,6 @@ async function bootGhost() { ghostServer = new GhostServer(); await ghostServer.start(rootApp); bootLogger.log('server started'); - // @TODO: move this - ghostServer.rootApp = rootApp; debug('End: load server + minimal app'); // Get the DB ready diff --git a/core/server/ghost-server.js b/core/server/ghost-server.js index 52c696cd1f..98a18d67a4 100644 --- a/core/server/ghost-server.js +++ b/core/server/ghost-server.js @@ -35,15 +35,15 @@ class GhostServer { * * ### Start * Starts the ghost server listening on the configured port. - * Alternatively you can pass in your own express instance and let Ghost - * start listening for you. - * @param {Object} externalApp - Optional express app instance. + * Requires an express app to be passed in + * + * @param {Object} rootApp - Required express app instance. * @return {Promise} Resolves once Ghost has started */ - start(externalApp) { + start(rootApp) { debug('Starting...'); const self = this; - const rootApp = externalApp ? externalApp : self.rootApp; + self.rootApp = rootApp; let socketConfig; const socketValues = {