mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
22 lines
540 B
TypeScript
22 lines
540 B
TypeScript
import process from "node:process";
|
|
import { config } from "@versia-server/config";
|
|
import { Youch } from "youch";
|
|
import { sentry } from "@/sentry";
|
|
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");
|
|
sentry?.captureMessage("Server started", "info");
|
|
|
|
createServer(config, await appFactory());
|