diff --git a/Jenkinsfile b/Jenkinsfile index fb120975..2352952b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -170,7 +170,7 @@ pipeline { def statusCode = "000" for (int i = 1; i <= 10; i++) { - statusCode = sh(script: "curl -k -s -o /dev/null -w '%{http_code}' https://${domain}/health || echo 000", returnStdout: true).trim() + statusCode = sh(script: "curl -k -s -o /dev/null -w '%{http_code}' https://${domain}/ || echo 000", returnStdout: true).trim() if (statusCode in ['200', '301', '302']) { echo "✅ Backend ${env.ENV} opérationnel (HTTP ${statusCode})" return diff --git a/index.js b/index.js index da4bc3b9..7d6c448e 100644 --- a/index.js +++ b/index.js @@ -21,9 +21,7 @@ app.use(helmet()); app.use(morgan("tiny")); app.use(express.json()); -app.get("/health", (req, res) => { - res.status(200).send("OK"); -}); + // --- Vérification connexion DB --- app.get("/db-check", async (req, res) => { try {