Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const express = require('express');
- const router = express.Router();
- /* GET home page. */
- router.get('/', function(req, res, next) {
- res.render('index', { title: 'Express' });
- });
- /* GET user with ID. */
- router.get('/forms-:id(\\d+)', function(req, res, next) {
- console.log(req.query.level);
- console.log(req.params.id);
- });
- router.post('/forms-101', (req, res) => {
- console.log(req.body.username); // retourne souhail
- });
- module.exports = router;
Add Comment
Please, Sign In to add comment