feat(app): added better auth for better auth stuff vs my home written broken one

This commit is contained in:
2025-09-18 21:46:01 -05:00
parent 21608b0171
commit caf2315191
16 changed files with 648 additions and 25 deletions

View File

@@ -1,10 +1,14 @@
import type { Express, Request, Response } from "express";
import healthRoutes from "./routes/healthRoutes.js";
import { setupAuthRoutes } from "../auth/routes/routes.js";
export const setupRoutes = (app: Express, basePath: string) => {
// Root / health check
app.use(basePath + "/health", healthRoutes);
app.use(basePath + "/api/system/health", healthRoutes);
// all routes
setupAuthRoutes(app, basePath);
// always try to go to the app weather we are in dev or in production.
app.get(basePath + "/", (req: Request, res: Response) => {