server/packages/api/index.ts
Jesse Wierzbinski aff51b651c
Some checks failed
Mirror to Codeberg / Mirror (push) Failing after 0s
Test Publish / build (client) (push) Failing after 0s
Test Publish / build (sdk) (push) Failing after 0s
refactor: ♻️ Rewrite logging logic into a unified package
2025-06-22 18:43:03 +02:00

20 lines
455 B
TypeScript

import process from "node:process";
import { config } from "@versia-server/config";
import { Youch } from "youch";
import { createServer } from "@/server";
import { appFactory } from "./app.ts";
process.on("SIGINT", () => {
process.exit();
});
process.on("uncaughtException", async (error) => {
const youch = new Youch();
console.error(await youch.toANSI(error));
});
await import("./setup.ts");
createServer(config, await appFactory());