Skip to content

Instantly share code, notes, and snippets.

@devm33
Created March 1, 2024 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devm33/48260b90e4301c8d28c76b8f5f83bb82 to your computer and use it in GitHub Desktop.
Save devm33/48260b90e4301c8d28c76b8f5f83bb82 to your computer and use it in GitHub Desktop.
beforeExit
process.on('beforeExit', async () => {
const res = await fetch('https://copilot-proxy.githubusercontent.com/_ping');
console.log('beforeExit', res.status, await res.text());
});
process.on('SIGINT', () => {
console.log('SIGINT');
process.exit(1);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment