This commit is contained in:
srgooglo 2021-06-15 17:41:13 +02:00
parent c1c9e74df5
commit 9985c26c59

View File

@ -68,6 +68,7 @@ class RequestServer {
this.params = params ?? {} this.params = params ?? {}
// set params jails // set params jails
this.id = this.params.id ?? runtime.helpers.getRootPackage().name
this.routes = [] this.routes = []
this.endpoints = { ...endpoints } this.endpoints = { ...endpoints }
this.middlewares = [...defaultMiddlewares] this.middlewares = [...defaultMiddlewares]
@ -231,7 +232,7 @@ class RequestServer {
}) })
this.httpServer.listen(this.params.port, () => { this.httpServer.listen(this.params.port, () => {
nethub.registerOrigin({ entry: "/", oid: this.oid }) nethub.registerOrigin({ entry: "/", oid: this.oid, id: this.id })
console.log(`✅ Ready on port ${this.params.port}!`) console.log(`✅ Ready on port ${this.params.port}!`)
}) })
} }