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

This commit is contained in:
2026-07-08 22:20:09 +04:00
parent cfdbae0653
commit 158de70e4e
3 changed files with 4 additions and 4 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');
});
// Если фатальная ошибка конфигурации — показываем на всех страницах сообщение