Is there a difference between
app.use('*', function (req, res, next) {
});
and...
app.all('*', function (req, res, next) {
});
app.all()
references the application router like post
or get
, while app.use()
simply references the applications middleware. app.use()
is better for more globally defined statements that you want persistent through your entire application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With