6 lines
156 B
JavaScript
6 lines
156 B
JavaScript
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));
|