tasminions / blog

1 stars 0 forks source link

Router.js and handler.js #26

Open sohilpandya opened 8 years ago

sohilpandya commented 8 years ago

Is this one step too far? I am having to go back and forth between the two to find out what happens at each endpoint, doesn't make it easy on the eyes necessarily

better way could be to create one file per route. so that all the code for the particular route is visible.

eliasmalik commented 8 years ago

@sohilpandya, have refactored in this branch. Is that what you meant?

I don't know if I'm convinced. IMO I would prefer to see all the routes in one place, and just follow the ones that I'm interested in.

Won't merge cos I haven't tested it and don't want to break everything before this afternoon.

sohilpandya commented 8 years ago

I prefer this one. :+1:

Also next week may show you how to use custom modules for each of your route.