chazapp / dird-project-back

A NodeJS Backend for DirdProject
2 stars 0 forks source link

Modify current structure #30

Closed williamluang closed 5 years ago

williamluang commented 5 years ago

Modify current structure to a more readable one

williamluang commented 5 years ago

Now we use Router inside multiples routes fil

williamluang commented 5 years ago

@shadonovitch when you have time can you check the branch hotfix/modify-struct

I isolated components on chat features. Can you give me some feedback when can ? I feel like it is better organized this way, each component is isolated from each other so it is more clear, at least for me.

williamluang commented 5 years ago

If you think this is useless, well i'll just get over it and do something else !

chazapp commented 5 years ago

I don't think what you tried to accomplish by separating routers and their function is appropriate. I've never seen a single Koa project doing that, and I think it impairs the readability of the routes. Although, the validators can be moved to their own file that would regroup each of them (a validators.js file in the routes/ directory) since we're going to have 3-4 validators tops.