mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
fix: 🔊 Fix logging code to not run in tests
This commit is contained in:
parent
c993b7207e
commit
08ce64e9b9
2
app.ts
2
app.ts
|
|
@ -1,6 +1,5 @@
|
|||
import { join } from "node:path";
|
||||
import { handleZodError } from "@/api";
|
||||
import { configureLoggers } from "@/loggers";
|
||||
import { sentry } from "@/sentry";
|
||||
import { cors } from "@hono/hono/cors";
|
||||
import { createMiddleware } from "@hono/hono/factory";
|
||||
|
|
@ -24,7 +23,6 @@ import { routes } from "./routes";
|
|||
import type { ApiRouteExports, HonoEnv } from "./types/api";
|
||||
|
||||
export const appFactory = async () => {
|
||||
await configureLoggers();
|
||||
const serverLogger = getLogger("server");
|
||||
|
||||
const app = new OpenAPIHono<HonoEnv>({
|
||||
|
|
|
|||
3
index.ts
3
index.ts
|
|
@ -1,9 +1,12 @@
|
|||
import cluster from "node:cluster";
|
||||
import { configureLoggers } from "@/loggers";
|
||||
import { sentry } from "@/sentry";
|
||||
import { createServer } from "@/server";
|
||||
import { appFactory } from "~/app";
|
||||
import { config } from "~/packages/config-manager/index";
|
||||
|
||||
await configureLoggers();
|
||||
|
||||
if (cluster.isPrimary) {
|
||||
for (let i = 0; i < Number(process.env.NUM_CPUS ?? 1); i++) {
|
||||
cluster.fork();
|
||||
|
|
|
|||
Loading…
Reference in a new issue