ci(docker): updated docker to correctly build and run
This commit is contained in:
@@ -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" });
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user