SHARE
TWEET

Untitled

a guest Dec 10th, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var express = require('express');
  2. var router = express.Router();
  3.  
  4.  
  5. router.put('/:name', function(req, res, next) {
  6.   let name = req.params.name;
  7.   res.send(`Hey ! my name is ${name}`);
  8. });
  9.  
  10. router.delete('/:id(\\d+)', function(req, res, next) {
  11.   let id = req.params.id;
  12.   res.send(`Hey it's a DELETE ID ${id}`);
  13. });
  14.  
  15. module.exports = router;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top