*Emit core.appServerStarted event after the appserver is booted
This commit is contained in:
parent
3ac8e38f66
commit
1b7ad1a896
|
@ -4,6 +4,7 @@ import fastify from "fastify";
|
||||||
import type { FastifyInstance } from "fastify";
|
import type { FastifyInstance } from "fastify";
|
||||||
import { getKeyPair } from "../lib/seed.js";
|
import { getKeyPair } from "../lib/seed.js";
|
||||||
import config from "../config";
|
import config from "../config";
|
||||||
|
import { getPluginAPI } from "./plugin";
|
||||||
|
|
||||||
let app: FastifyInstance;
|
let app: FastifyInstance;
|
||||||
|
|
||||||
|
@ -18,6 +19,8 @@ export async function start() {
|
||||||
});
|
});
|
||||||
|
|
||||||
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.appServerStarted");
|
||||||
}
|
}
|
||||||
|
|
||||||
export function get(): FastifyInstance {
|
export function get(): FastifyInstance {
|
||||||
|
|
Loading…
Reference in New Issue