-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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. |
There was a problem hiding this comment.
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) => { |
There was a problem hiding this comment.
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.
No description provided.