From 1b7ad1a8967bf99eed07ce0acc475c93479bb15e Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 18 Apr 2023 22:47:40 -0400 Subject: [PATCH] *Emit core.appServerStarted event after the appserver is booted --- src/modules/app.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/app.ts b/src/modules/app.ts index fd33979..18e19e8 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -4,6 +4,7 @@ import fastify from "fastify"; import type { FastifyInstance } from "fastify"; import { getKeyPair } from "../lib/seed.js"; import config from "../config"; +import { getPluginAPI } from "./plugin"; let app: FastifyInstance; @@ -18,6 +19,8 @@ export async function start() { }); await app.listen({ port: config.uint("core.appport"), host: "0.0.0.0" }); + + getPluginAPI().emit("core.appServerStarted"); } export function get(): FastifyInstance {