Created
March 1, 2024 02:31
-
-
Save devm33/48260b90e4301c8d28c76b8f5f83bb82 to your computer and use it in GitHub Desktop.
beforeExit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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