*Add core.appServer.buildRoutes async event to allow plugins to register routes

This commit is contained in:
Derrick Hammer 2023-04-19 00:29:13 -04:00
parent 38d6198628
commit 90e0f3f2c4
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 0 deletions

View File

@ -18,6 +18,8 @@ export async function start() {
res.send(Buffer.from(keyPair.publicKey).toString("hex")); res.send(Buffer.from(keyPair.publicKey).toString("hex"));
}); });
await getPluginAPI().emitAsync("core.appServer.buildRoutes");
await app.listen({ port: config.uint("core.appport"), host: "0.0.0.0" }); await app.listen({ port: config.uint("core.appport"), host: "0.0.0.0" });
getPluginAPI().emit("core.appServer.started"); getPluginAPI().emit("core.appServer.started");