ExpressJS — Clean Routing

There are at least 3 ways to route using ExpressJS.
First and the most common is to have everything in one file. Then you can have it in two separate files, server and routes, or have a route file for each page, if your pages don’t need to interact with themselves this will be the cleaner way of defining routes.
Lets see what which one looks like.
Normal, single file routing.
Routing from a separate file:
Routes on each file:
So as we can see each method requires a little difference when setting up the server. This makes the code more readable there fore easier to have a team work with it.