Michael Pashkov22,022 Points
What for we need different routes?
What for we need different routes? apps will often have more than one routes file. Why exactly we divided routes from app.js into several files?
For below reasons:
- better modularity
- often app.js will end up getting too large if app is big. so its good idea to seperate routes to different file. and also, if routes are too many then they get further divided into several files as well.
- app.js will act more like a main entry point or controller which will orchastrate different aspects of the functionality.