Guest User

Untitled

a guest
Oct 19th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. app.post('/api/stop', tokenAuthentication, (req, res) => {
  2. console.log('hello', req.body);
  3. if( req.isTokenAuthenticated ) {
  4. console.log("Stopped by", req.tokenUsername);
  5. process.exit();
  6. } else {
  7. console.log("Token required");
  8. }
  9. res.send();
  10. });
Add Comment
Please, Sign In to add comment