robb-j / gruber

(WIP) An web-standards server JavaScript library & patterns
0 stars 0 forks source link

Incorporate something like @godaddy/terminus #8

Open robb-j opened 3 months ago

robb-j commented 3 months ago

Most servers I write need it and it could be a good addition to the module.

requirements

robb-j commented 2 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