Quantcast
Channel: when to use app.use() in Node express app - Stack Overflow
Viewing all articles
Browse latest Browse all 4

when to use app.use() in Node express app

$
0
0

I was trying to comprehend when do we need to use app.use in our node Express

While searching on web, I stumbled on this answer on reddit stating the difference between app.get and app.use

Based on which, I was able to summarise the following things.

app.use act as a super route or middleware? meaning that it gets called on every route written below/after app.use?

Also, would appreciate if someone could add more information/practise about app.use.


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images