wk2 lesson notes -- Griffiths#19
Open
crgriffiths wants to merge 4 commits intopce-uw-jscript400:masterfrom
Open
wk2 lesson notes -- Griffiths#19crgriffiths wants to merge 4 commits intopce-uw-jscript400:masterfrom
crgriffiths wants to merge 4 commits intopce-uw-jscript400:masterfrom
Conversation
MadEste
reviewed
Jul 13, 2019
| * **Question:** Take a minute to look through the installed packages and describe the purpose of each one. Don't just copy and paste from something online! | ||
|
|
||
| * **Your Answer:** | ||
| * **Your Answer:** Body parser appears to parse response data. Express is a simple javascript server library for serving files from a Node backend. Morgan is a testing framework. Nodemon appears to be a task runner. |
There was a problem hiding this comment.
Morgan provides logs for dev purposes.
MadEste
reviewed
Jul 13, 2019
| * **Question:** What type of thing is `app` and what is its purpose? | ||
|
|
||
| * **Your Answer:** | ||
| * **Your Answer:** App is a function and its various attached methods referencing the Express module. |
There was a problem hiding this comment.
👍
Also an event emitter and our running instance of the server.
MadEste
reviewed
Jul 13, 2019
| * **Question:** The above can be described as middleware. Describe what middleware is in your own words and how it differs from building a route. | ||
|
|
||
| * **Your Answer:** | ||
| * **Your Answer:** Middleware is like a utility or helper for processessing requests. A route is an endpoint a client can make a request to. That endpoint would likely use that middleware to help process said request. |
MadEste
reviewed
Jul 13, 2019
| * **Question:** Try commenting out `body-parser` in your application. What happens and why? | ||
|
|
||
| * **Your Answer:** | ||
| * **Your Answer:** Nothing was logged. This is likely because the response object has not been properly handled or parsed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.