Open robb-j opened 3 months ago
Maybe:
import { Terminator } from "gruber";
const arnie = new Terminator(
config.env,
() => 'ok'
)
arnie.addEventListener('terminate', () => {
// kill server
// ???
})
Then there can be different implementations for Node/Deno using the relevant APIs
Questions
Most servers I write need it and it could be a good addition to the module.
requirements
/healthz
endpoint