admin services
This commit is contained in:
@@ -2,9 +2,17 @@ import { createApp } from "./app.js";
|
||||
import { env } from "./config/env.js";
|
||||
import { bootstrapAppData } from "./lib/bootstrap.js";
|
||||
import { prisma } from "./lib/prisma.js";
|
||||
import { setLatestStartupReport } from "./lib/startup-state.js";
|
||||
import { assertStartupReadiness } from "./lib/startup-validation.js";
|
||||
|
||||
async function start() {
|
||||
await bootstrapAppData();
|
||||
const startupReport = await assertStartupReadiness();
|
||||
setLatestStartupReport(startupReport);
|
||||
|
||||
for (const check of startupReport.checks.filter((entry) => entry.status !== "PASS")) {
|
||||
console.warn(`[startup:${check.status.toLowerCase()}] ${check.label}: ${check.message}`);
|
||||
}
|
||||
|
||||
const app = createApp();
|
||||
const server = app.listen(env.PORT, () => {
|
||||
@@ -25,4 +33,3 @@ start().catch(async (error) => {
|
||||
await prisma.$disconnect();
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user