Skip to content

Commit

Permalink
[docs]: Routing - timeLog not defined (#1410)
Browse files Browse the repository at this point in the history
* [docs]: Routing - `timeLog` not defined

Either have a function named `timeLog` or reword the last sentence of the page to remove the use of that name.

* Update routing.md

Remove EOL colons to conform with doc code style

---------

Co-authored-by: Rand McKinney <crandmck@yahoo.com>
  • Loading branch information
gregfenton and crandmck authored Mar 7, 2024
1 parent 878af14 commit 9afb599
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions en/guide/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,12 @@ const express = require('express')
const router = express.Router()

// middleware that is specific to this router
router.use((req, res, next) => {
const timeLog = (req, res, next) => {
console.log('Time: ', Date.now())
next()
})
}
router.use(timeLog)

// define the home page route
router.get('/', (req, res) => {
res.send('Birds home page')
Expand Down

0 comments on commit 9afb599

Please sign in to comment.