Harden production deployment lifecycle

This commit is contained in:
Arun committed 2026-08-11 09:25:44 +00:00
1 parent 3fbf2743d0
commit 5aa16b0f05
11 files changed
+475 -35

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
const port = process.env.PORT || 3000;
const url = `http://127.0.0.1:${port}/health/ready`;
fetch(url, { signal: AbortSignal.timeout(4000) })
.then(response => {
if (!response.ok) throw new Error(`readiness returned ${response.status}`);
})
.catch(error => {
console.error(error.message);
process.exit(1);
});