mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 22:25:12 +00:00
Display localhost instead of 0.0.0.0
This commit is contained in:
parent
c9313572bd
commit
84e5eabd99
@ -46,12 +46,13 @@ class Server {
|
||||
}
|
||||
|
||||
listen (port, host) {
|
||||
host = host || '127.0.0.1'
|
||||
host = host || 'localhost'
|
||||
port = port || 3000
|
||||
this.nuxt.ready()
|
||||
.then(() => {
|
||||
this.server.listen(port, host, () => {
|
||||
console.log('Ready on http://%s:%s', host, port) // eslint-disable-line no-console
|
||||
let _host = host === '0.0.0.0' ? 'localhost' : host
|
||||
console.log('Ready on http://%s:%s', _host, port) // eslint-disable-line no-console
|
||||
})
|
||||
})
|
||||
return this
|
||||
|
Loading…
Reference in New Issue
Block a user