Skip to content

Commit bae5e8e

Browse files
author
codingChewie
committed
Middleware Sequence and Routing
1 parent 02bf369 commit bae5e8e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

app.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ app.use(cookieParser())
99

1010
app.set('view engine', 'pug')
1111

12+
app.use((req, res, next) => {
13+
req.message = 'message made it'
14+
next()
15+
})
16+
17+
app.use((req, res, next) => {
18+
console.log(req.message)
19+
next()
20+
})
21+
1222
app.get('/', (req, res) => {
1323
const name = req.cookies.username
1424

0 commit comments

Comments
 (0)