ci(docker): updated docker to correctly build and run

This commit is contained in:
2025-08-31 09:07:06 -05:00
parent e75883e587
commit f348e4e053
4 changed files with 55 additions and 51 deletions

View File

@@ -1,15 +1,18 @@
import type { Express, Request, Response } from "express";
import healthRoutes from './routes/healthRoutes.js'
import healthRoutes from "./routes/healthRoutes.js";
export const setupRoutes = (app: Express, basePath: string) => {
// Root / health check
app.use(basePath + "/health", healthRoutes);
// Root / health check
app.use(basePath + "/health", healthRoutes);
// always try to go to the app weather we are in dev or in production.
app.get(basePath + "/", (req: Request, res: Response) => {
res.redirect(basePath + "/app");
});
// Fallback 404 handler
app.use((req: Request, res: Response) => {
res.status(404).json({ error: "Not Found" });
});
}
// Fallback 404 handler
app.use((req: Request, res: Response) => {
res.status(404).json({ error: "Not Found" });
});
};