Biome format

This commit is contained in:
2025-09-03 12:37:29 -03:00
parent 55fab87db3
commit 5f6136a378
43 changed files with 1473 additions and 1379 deletions

View File

@@ -14,43 +14,42 @@ import { logger } from "./lib/logger";
const app = new Hono();
if (process.env.NODE_ENV === "development") {
try {
const composePath = join(process.cwd(), "docker-compose.yml");
execSync(`docker-compose -f ${composePath} up -d`, { stdio: "inherit" });
logger.info("Waiting for services to start...");
execSync("sleep 2");
logger.info("Docker Compose started successfully");
} catch (error) {
logger.error("Failed to start Docker Compose:", error);
}
try {
const composePath = join(process.cwd(), "docker-compose.yml");
execSync(`docker-compose -f ${composePath} up -d`, { stdio: "inherit" });
logger.info("Waiting for services to start...");
execSync("sleep 2");
logger.info("Docker Compose started successfully");
} catch (error) {
logger.error("Failed to start Docker Compose:", error);
}
}
app.use(honoLogger());
app.use(
"/*",
cors({
origin: process.env.CORS_ORIGIN || "",
allowMethods: ["GET", "POST", "OPTIONS"],
allowHeaders: ["Content-Type", "Authorization"],
credentials: true,
}),
"/*",
cors({
origin: process.env.CORS_ORIGIN || "",
allowMethods: ["GET", "POST", "OPTIONS"],
allowHeaders: ["Content-Type", "Authorization"],
credentials: true,
})
);
app.on(["POST", "GET"], "/api/auth/**", (c) => auth.handler(c.req.raw));
app.use(
"/trpc/*",
trpcServer({
router: appRouter,
createContext: (_opts, context) => {
return createContext({ context });
},
}),
"/trpc/*",
trpcServer({
router: appRouter,
createContext: (_opts, context) => {
return createContext({ context });
},
})
);
app.get("/", (c) => {
return c.text("OK");
return c.text("OK");
});
export default app;