diff --git a/lib/core/nuxt.js b/lib/core/nuxt.js index 1173dd87da..5b715794ad 100644 --- a/lib/core/nuxt.js +++ b/lib/core/nuxt.js @@ -129,7 +129,7 @@ export default class Nuxt { return reject(err) } - ({ host, port } = server.address()) + ({ address: host, port } = server.address()) if (['127.0.0.1', '0.0.0.0'].includes(host)) { host = 'localhost' } diff --git a/test/unit/cli-start.test.js b/test/unit/cli-start.test.js index a168560cbd..57926f567d 100644 --- a/test/unit/cli-start.test.js +++ b/test/unit/cli-start.test.js @@ -40,7 +40,8 @@ describe.skip.appveyor('cli', () => { } expect(error).toBe(undefined) - expect(stdout.includes('Listening on')).toBe(true) + expect(stdout.includes('Listening on ')).toBe(true) + expect(stdout.includes(`http://localhost:${port}`)).toBe(true) const html = await rp(url('/')) expect(html).toMatch(('
CLI Test
'))