Created
April 8, 2018 18:31
-
-
Save soner8/99b4a59714b82090cacb0bdc2d841215 to your computer and use it in GitHub Desktop.
index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var router = express.Router(); | |
var app = express(); | |
/* GET home page. */ | |
router.get('/', function (req, res) { | |
res.render('index', { | |
title: 'Express' | |
}); | |
}); | |
router.use('/superMiddleware', function (req, res, next) { | |
console.log('Hello middleware'); | |
next(); | |
}, function (req, res, next){ | |
res.send('hello world'); | |
}); | |
module.exports = router; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment