3 ms·
Awesome effort! I love the folder structure, very easy to follow. A small feedback: I just generated a React-based stack with a few Auth options - Email, Faceb
by fredwu 10y ago
Awesome effort! I love the folder structure, very easy to follow.
A small feedback: I just generated a React-based stack with a few Auth options - Email, Facebook, Google and Twitter.
The resulting `user.js` controller is 550 LoC.
It would be great if by default some of these logic are encapsulated in a service layer rather than littered in the controller itself. :)
- sahatyalkabov 10y agoThanks for the feedback! Agreed, it makes sense to refactor those routes into its own Auth controller. I will open a GitHub issue. However, some of the code is intentionally written that way to keep things stupid simple and easy to understand for developers of all skill levels, which you would normally encapsulate into a service in your own app.
- rhizome 10y agoYou can call it "refactor-ready." ;)