Fix: /ready всегда 200 — nginx не блокирует трафик. Версия 0.1.16

This commit is contained in:
“Naeel”
2026-07-08 22:20:09 +04:00
parent 9ad95a66bc
commit 1f8114ec1a
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -78,10 +78,10 @@ async function start() {
app.get('/ready', async (req, res) => {
try {
await pool.query('SELECT 1');
res.send('OK');
} catch (e) {
res.status(503).send('DB not ready');
// БД не отвечает — но приложение открыто, покажет ошибку на страницах
}
res.send('OK');
});
// Если фатальная ошибка конфигурации — показываем на всех страницах сообщение