I like to keep my index file as simple as possible. I thought I’d share a helper function to clean up your routes.
My /routes folder looks like this:
Shell
tree
JS
/helpers/loadRoutes.js
Now in your index.js file:
JS
/index.js
It’s that easy!