parent
8b5deac92b
commit
11eaf0b470
@ -584,8 +584,11 @@ export class HttpServer {
|
|||||||
const onListen = (): void => resolve(this.address())
|
const onListen = (): void => resolve(this.address())
|
||||||
if (this.options.socket) {
|
if (this.options.socket) {
|
||||||
this.server.listen(this.options.socket, onListen)
|
this.server.listen(this.options.socket, onListen)
|
||||||
|
} else if (this.options.host) {
|
||||||
|
// [] is the correct format when using :: but Node errors with them.
|
||||||
|
this.server.listen(this.options.port, this.options.host.replace(/^\[|\]$/g, ""), onListen)
|
||||||
} else {
|
} else {
|
||||||
this.server.listen(this.options.port, this.options.host, onListen)
|
this.server.listen(this.options.port, onListen)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user