Can I require the module in my app.js file?
Closed this issue · 1 comments
eithermonad commented
I'm wondering where the best place to require
the module is if my routes and controllers are in separate files.
Should I require
it in the same file where I create the Express Application?
Thank you.
kronicker commented
Hi @JamieCorkhill, since we're patching Express#Router
it's best to require it before the first use of it.
It depends on your structure, but in most use-cases file where you create Espress app is good.