1var express = require('express')
2var router = express.Router()
3
4// middleware that is specific to this router
5router.use(function timeLog (req, res, next) {
6 console.log('Time: ', Date.now())
7 next()
8})
9// define the home page route
10router.get('/', function (req, res) {
11 res.send('Birds home page')
12})
13// define the about route
14router.get('/about', function (req, res) {
15 res.send('About birds')
16})
17
18module.exports = router
19