Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let express = require('express')
- let router = express.Router()
- /* GET home page. */
- router.get('/', function(req, res, next) {
- res.render('index', { title: 'Express' })
- })
- /* superMiddleware page with a nice Middleware*/
- router.use('/superMiddleware', function(req, res, next) {
- console.log('Hello middleware')
- next()
- }, function (req, res, next) {
- res.send('Hello World')
- })
- module.exports = router
Add Comment
Please, Sign In to add comment