Skip to content

W2 Lesson Notes - J.Sorge#28

Open
Jiansorge wants to merge 1 commit intopce-uw-jscript400:masterfrom
Jiansorge:master
Open

W2 Lesson Notes - J.Sorge#28
Jiansorge wants to merge 1 commit intopce-uw-jscript400:masterfrom
Jiansorge:master

Conversation

@Jiansorge
Copy link

No description provided.

* **Question:** Why do we get a response when we go to `/` but not `/notfound`?

* **Your Answer:**
* **Your Answer:** There's a get request response for only the index file. We have not defined the /notfound route anywhere in the app.
Copy link
Contributor

Choose a reason for hiding this comment

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

Small note, but it's not necessarily the index file, but rather the index route.

* **Question:** What is `req.params`? What else will you need to change if you change the path to `/my/name/is/:username`?

* **Your Answer:**
* **Your Answer:** these are the query parameters used in the queries url string. You will need to change the response to utilize req.params. You can change the ':username' part of the parth.
Copy link
Contributor

Choose a reason for hiding this comment

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

In this case, we'd actually talk about this as "route parameters." "Query parameters" are what comes after the route ends (i.e. after the ?).

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