Mise à jour de index.js

This commit is contained in:
soufiane 2025-11-03 22:29:45 +01:00
parent 622053c08e
commit 2268fc06c5

View File

@ -9,6 +9,7 @@ import { pool } from "./db.js";
dotenv.config();
const app = express();
// --- Middlewares globaux ---
app.use(
cors({
origin: ["http://localhost:3000", "https://dsp5-archi-o24a-15m-g3.fr"],
@ -29,7 +30,7 @@ app.get("/db-check", async (req, res) => {
}
});
// --- Route santé ---
// --- Route de santé ---
app.get("/health", (req, res) => {
res.status(200).json({ status: "ok" });
});