I don\'t want to put an authentication function at the top of every app.get(), how can I execute code on every request, before app.get()?
app.get()
You can also do:
app.all('*', auth.requireUser);