mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-03-31 05:59:26 +02:00
15 lines
263 B
JavaScript
15 lines
263 B
JavaScript
#!/usr/bin/env node
|
|
// Simple healthcheck for the Nomad agent
|
|
|
|
const port = process.env.AGENT_PORT || 9100
|
|
|
|
try {
|
|
const res = await fetch(`http://localhost:${port}/health`)
|
|
if (res.ok) {
|
|
process.exit(0)
|
|
}
|
|
process.exit(1)
|
|
} catch {
|
|
process.exit(1)
|
|
}
|