Mise à jour de index.js

This commit is contained in:
soufiane 2025-11-03 22:06:13 +01:00
parent 83f7ad0553
commit 39f7256c0b
2 changed files with 2 additions and 4 deletions

2
Jenkinsfile vendored
View File

@ -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

View File

@ -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 {