From 90e0f3f2c47d37f8334faa8aaa6c30a4e43101ca Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 19 Apr 2023 00:29:13 -0400 Subject: [PATCH] *Add core.appServer.buildRoutes async event to allow plugins to register routes --- src/modules/app.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/app.ts b/src/modules/app.ts index 5b55c8d..8abdd0a 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -18,6 +18,8 @@ export async function start() { 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" }); getPluginAPI().emit("core.appServer.started");