week two homework, Ryan Fields #14
Open
ryancfields wants to merge 1 commit into
Open
Conversation
MadEste
reviewed
Jul 13, 2019
| I noticed it is powered by Express. | ||
|
|
||
| Headers are values that are passed in the response and also returned by the server. It is data that is exchanged between the client and server. | ||
|
|
MadEste
reviewed
Jul 13, 2019
| * **Your Answer:** | ||
| - You can add any headers in the request in Postman under the Headers tab. | ||
|
|
||
| - When we add the console.log component, then on node we see logging of the headers on the node instance. |
MadEste
reviewed
Jul 13, 2019
| * **Question:** When does `app.use()` get called? | ||
|
|
||
| * **Your Answer:** | ||
| Always, it is called every time. It is just a general request for everything to go through. |
There was a problem hiding this comment.
Always called as long as the request has made it to that point in the route chain.
MadEste
reviewed
Jul 13, 2019
| * **Question:** What type of thing is `app` and what is its purpose? | ||
|
|
||
| * **Your Answer:** | ||
| app is the function that contains all of the methods we will use. When you invoke express you get app. |
There was a problem hiding this comment.
out instance of a server, also a function / event emitter
MadEste
reviewed
Jul 13, 2019
| * **Question:** What type of thing is `next` and what does it represent in the callback? | ||
|
|
||
| * **Your Answer:** | ||
| Forward request to the next route that matches. |
MadEste
reviewed
Jul 13, 2019
| * **Your Answer:** | ||
|
|
||
| Route Parameters and not query parameters. | ||
| --- |
There was a problem hiding this comment.
res.json({ message: Hello, ${req.params.username}! })
MadEste
reviewed
Jul 13, 2019
|
|
||
| * **Your Answer:** | ||
|
|
||
| Fails to parse in Postman. |
There was a problem hiding this comment.
Fails to parse the body in the server, and subsequently fails to respond to Postman
MadEste
reviewed
Jul 13, 2019
| * **Question:** Try creating a new vegetable. Then, try restarting your server. What happens to the data you posted and why? | ||
|
|
||
| * **Your Answer:** | ||
| All gone, no persistent storage. |
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.