support custom httpServer listen

This commit is contained in:
srgooglo 2021-07-19 14:40:25 +02:00
parent fc615982a2
commit 625c555cf8

View File

@ -118,7 +118,7 @@ class Server {
} }
}) })
} }
if (typeof endpoint.controller.exec === "function") { if (typeof endpoint.controller.exec === "function") {
routeModel.push(endpoint.controller.exec) routeModel.push(endpoint.controller.exec)
} }
@ -247,7 +247,7 @@ class Server {
this.httpServer.use('/', this.router) this.httpServer.use('/', this.router)
this.httpServer.listen(this.port, () => { this.httpServer.listen(this.port, this.params.listen ?? '0.0.0.0', () => {
//? register to nethub //? register to nethub
if (this.params.onlineNethub) { if (this.params.onlineNethub) {
nethub.registerOrigin({ entry: "/", oskid: this.oskid, id: this.id }) nethub.registerOrigin({ entry: "/", oskid: this.oskid, id: this.id })