Add ping endpoint for health check
This commit is contained in:
@@ -26,6 +26,7 @@ app.use(cors());
|
|||||||
app.use(express.json());
|
app.use(express.json());
|
||||||
|
|
||||||
// ─── Public routes (no auth required) ────────────────────────────────────────
|
// ─── Public routes (no auth required) ────────────────────────────────────────
|
||||||
|
app.get('/api/ping', (req, res) => res.json({ ok: true }));
|
||||||
app.use('/api/auth', authRouter);
|
app.use('/api/auth', authRouter);
|
||||||
|
|
||||||
// ─── Protected routes (JWT required) ─────────────────────────────────────────
|
// ─── Protected routes (JWT required) ─────────────────────────────────────────
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- sloth-net
|
- sloth-net
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "-qO-", "http://localhost:3001/api/providers"]
|
test: ["CMD", "wget", "-qO-", "http://localhost:3001/api/ping"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|||||||
Reference in New Issue
Block a user