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

Caroline Cariste: Sprint Challenge Complete #1

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

Conversation

pinto8
Copy link

@pinto8 pinto8 commented May 30, 2018

No description provided.

Copy link

@Kamalnrf Kamalnrf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️ What went well:


  • I like the function you wrote for errors
  • Migrations and seeds are also good
  • Commit messages are also good

🎗️ Recommendation(s):


  • Instead of having duplicate code for bad requests you can write a middleware to do that work.
  • It is better to isolate all your explicit database changes in a different file like dataHelper.js so your API code looks cleaner and easy to maintain.
  • Use a logger like morgan or any other

@@ -2,16 +2,32 @@

## What is Node.js?

* Node.js is a JavaScript run-time environment that includes everything you need to execute a program written in JavaScript. It allows JS to run within the browser.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node.js allows JS to run outside of the browser


module.exports = router;

const sendUserError = (msg, res) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this, you could have written a middleware instead.

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