updated healthcheck with a dedicated function

This commit is contained in:
venus
2026-09-13 14:38:49 -05:00
parent acd47b80aa
commit eddbf5470e
3 changed files with 28 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
const port = process.env.PORT || 8080;
fetch(`http://127.0.0.1:${port}/healthz`)
.then((res)) => process.exit(res.ok ? 0:1))
.catch(() process.exit(1));