mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 15:22:39 +00:00
fix: wait for core to be ready before listen (#3407)
This commit is contained in:
parent
3c54d26c76
commit
3b2ed038da
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user