mirror of
https://github.com/ragestudio/linebridge.git
synced 2025-06-09 18:44:17 +00:00
use asyncronous init method
This commit is contained in:
parent
c81094f5f0
commit
91ccdccdba
@ -251,7 +251,7 @@ class Server {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
init() {
|
init = async () => {
|
||||||
// write lastStart
|
// write lastStart
|
||||||
serverManifest.write({ lastStart: Date.now() })
|
serverManifest.write({ lastStart: Date.now() })
|
||||||
|
|
||||||
@ -268,14 +268,14 @@ class Server {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
this.httpServer.listen(this.port, this.params.listen ?? '0.0.0.0', () => {
|
await 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 })
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`✅ Ready on port ${this.port}!`)
|
console.log(`✅ Ready on port ${this.port}!`)
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user