In my node.js code, I have lot router and authentication to manage, like:
app.get('/', fn);
app.get('/admin', checkAccess, fn);
app.get('/blog', checkAccess, fn);
may be the router number coule be dozen or more,
how can I manage them better?
Is there a manage module? or something like this?
You can use multiple callbacks, as per your example, or a simple decorator pattern.
Multiple callbacks
Simple decorator pattern