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

Made code leaner by outsourcing routes logic to controllers and updated the entire project to use ES6+ syntax #104

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Sayan3sarkar
Copy link

Hey,

The following is the list of changes I made and these changes are causing the app to behave exactly the same as running the app on the master branch would.

  1. Updated the entire project to use ES6+ syntax like let/const instead of var and Arrow functions in place of 'function'.
  2. Outsourced all the logic of the files inside routes/api directory to have a controller based apporach by putting the internal logic in controllers folder. This gives the app a MVC like architecture and makes the code leaner.

The latest commit has all these changes covered.

Kindly merge this request.

Regards,
Sayan Sarkar

@ctrngk
Copy link

ctrngk commented Oct 15, 2020

Unfortunately it is not working

TypeError: this.generateJWT is not a function
at model.UserSchema.methods.toAuthJSON (node-express-realworld-example-app/models/User.js:46:17)

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

Successfully merging this pull request may close these issues.

2 participants