Skip to content

in class answers#26

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

in class answers#26
oieeri26 wants to merge 1 commit intopce-uw-jscript400:masterfrom
oieeri26:master

Conversation

@oieeri26
Copy link

No description provided.


* **Your Answer:**

`app.use()` gets called every time a request is sent.
Copy link

Choose a reason for hiding this comment

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

app.use iwll be called whenever a request reaches that point of the route chain.


* **Your Answer:**

`app` is an object with multiple methods.
Copy link

Choose a reason for hiding this comment

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

Our instance of the server. Also a function / event emitter.


* **Your Answer:**

`next` is the next available matching route.
Copy link

Choose a reason for hiding this comment

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

👍

* **Your Answer:**

Since the data is stored in memory and not saved anywhere else, it is gone when the server is restarted.

Copy link

Choose a reason for hiding this comment

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

👍

* **Your Answer:**

First `app.use` will return a 404 status and and error message if a path is not found and the second `app.use` logs the error message.

Copy link

Choose a reason for hiding this comment

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

Excellent!

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