Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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();
- });
Add Comment
Please, Sign In to add comment