diff --git a/index.js b/index.js index ae37c3ba..3372f2d4 100644 --- a/index.js +++ b/index.js @@ -19,14 +19,14 @@ app.use(helmet()); app.use(morgan("tiny")); app.use(express.json()); -// ✅ Nouvelle route /health pour Jenkins app.get("/health", (req, res) => { res.status(200).json({ status: "ok" }); +}); + +// ✅ Route racine (pour test ou monitoring) +app.get("/", (req, res) => { + res.status(200).json({ message: "✅ API The Tip Top en ligne et opérationnelle !" }); }); - -// ✅ Route racine (pour éviter le 404 sur /) - - // Vérif base de données app.get("/db-check", async (req, res) => { try { @@ -49,4 +49,4 @@ app.get("/metrics", async (req, res) => { const PORT = process.env.PORT || 4000; app.listen(PORT, "0.0.0.0", () => { console.log(`🚀 Backend lancé sur 0.0.0.0:${PORT} ✅`); -}); +}); \ No newline at end of file