Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
app.post('/api/stop', tokenAuthentication, (req, res) => {
console.log('hello', req.body);
if( req.isTokenAuthenticated ) {
console.log("Stopped by", req.tokenUsername);
process.exit();
} else {
console.log("Token required");
}
res.send();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.