Skip to content

Instantly share code, notes, and snippets.

@soner8 soner8/Delete.js
Created Apr 16, 2018

What would you like to do?
var express = require('express');
var router = express.Router();
router.get('/:nom((\[a-z]+))', function (req, res, next) {
res.render('update-user', {
id: req.params.nom
router.put('/:nom((\[a-z]+))', function (req, res, next) {
res.send('The new name is ' + req.params.nom)
router.get('/:numero(\\d+)', function (req, res, next) {
res.render('delete-user', {
num: req.params.numero
router.delete('/:numero(\\d+)', function (req, res, next) {
res.send('No more user ' + req.params.numero)
module.exports = router;
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.