diff --git a/lib/core/nuxt.js b/lib/core/nuxt.js index 25f8ac8923..c70bf4485d 100644 --- a/lib/core/nuxt.js +++ b/lib/core/nuxt.js @@ -120,7 +120,7 @@ export default class Nuxt { } listen(port = 3000, host = 'localhost') { - return new Promise((resolve, reject) => { + return this.ready().then(() => new Promise((resolve, reject) => { const server = this.renderer.app.listen( { port, host, exclusive: false }, err => { @@ -155,7 +155,7 @@ export default class Nuxt { // Add server.destroy(cb) method enableDestroy(server) - }) + })) } resolveAlias(_path) {