We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b5deac commit 114aecdCopy full SHA for 114aecd
src/node/http.ts
@@ -584,8 +584,11 @@ export class HttpServer {
584
const onListen = (): void => resolve(this.address())
585
if (this.options.socket) {
586
this.server.listen(this.options.socket, onListen)
587
+ } else if (this.options.host) {
588
+ // [] is the correct format but Node errors with them.
589
+ this.server.listen(this.options.port, this.options.host.replace(/^\[|\]$/g, ""), onListen)
590
} else {
- this.server.listen(this.options.port, this.options.host, onListen)
591
+ this.server.listen(this.options.port, onListen)
592
}
593
})
594
0 commit comments