mirror of
https://git.tuxpa.in/a/code-server.git
synced 2024-12-28 21:25:25 +00:00
parent
8b5deac92b
commit
11eaf0b470
@ -584,8 +584,11 @@ export class HttpServer {
|
||||
const onListen = (): void => resolve(this.address())
|
||||
if (this.options.socket) {
|
||||
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 {
|
||||
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