Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Express conventions #1

Open
cameronjacoby opened this issue Nov 3, 2015 · 2 comments
Open

Express conventions #1

cameronjacoby opened this issue Nov 3, 2015 · 2 comments
Assignees

Comments

@cameronjacoby
Copy link
Contributor

@eerwitt - Can you look over the server file and Mongoose models to make sure they follow best-practices? I built this in the way we taught node/express/mongo for the last cohort and would love to use this API as a standard for how we're going to teach it this time. So I'd love to get your input to see if we should make any changes!

We have not separated controllers from routes in the past - everything just lives in the one server.js file. The module.exports can be confusing for students, so having just one server file is a way to make it less overwhelming. But if you feel strongly that it's an anti-pattern, we can definitely take a different approach.

@eerwitt
Copy link
Contributor

eerwitt commented Nov 3, 2015

Looking good so far, I understand the logic behind skipping module.exports and think this makes things much more clear.

I've been pushing people towards using http://usejsdoc.org/ formatted comments which I believe is a good habit especially for routes like this.

@cameronjacoby
Copy link
Contributor Author

@eerwitt Thanks for taking a look! I'll try to refactor some of the comments as we keep working on and improving the API 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants