DEV Community

Discussion on: External Routes with Node.js

Collapse
 
hm04 profile image
Matthew Marion

Good explanation of how to move routes to an external file; however, you still aren't making your code cleaner, easier to understand, or even maintainable. By the looks of it you are simply "cleaning your room" by stuffing everything in the closet. Anyways, good explanation of external routes, I just do not think it solves all the problems you claimed in the introduction.

Collapse
 
ryhenness profile image
Ryan

Thanks for the feedback! I've updated the intro with something I believe to be a bit more fitting, along with an explanation. I agree with your argument that the code does not become cleaner, it is just being moved somewhere else. I would argue that external routes do make the code easier to understand, and maintainable by putting things into their drawers, rather than stuffing everything in the closet.

Collapse
 
hm04 profile image
Matthew Marion

No problem! I do also agree that it can make it easier to understand to an extent.