mirror of
https://github.com/nicotsx/zerobyte.git
synced 2026-04-19 14:28:54 -04:00
* refactor: add nitro bootstrap plugin to ensure app is started before first call * refactor(bootstrap): avoid duplicate event firing
12 lines
362 B
TypeScript
12 lines
362 B
TypeScript
import { definePlugin } from "nitro";
|
|
import { bootstrapApplication } from "../modules/lifecycle/bootstrap";
|
|
import { logger } from "../utils/logger";
|
|
import { toMessage } from "../utils/errors";
|
|
|
|
export default definePlugin(() => {
|
|
void bootstrapApplication().catch((err) => {
|
|
logger.error(`Bootstrap failed: ${toMessage(err)}`);
|
|
process.exit(1);
|
|
});
|
|
});
|