objects
not normally, unless ‘let’ or ‘const’ are involved (?)
A constructor is a Bob the builder, he makes objects by contructing them out of what is defined as needed, and like Bob, they are one of a kind, if there were two the matix would crase (ie. syntax error).
As for the contexutual this, excuse my literal nature but if you were to draw a chaulk circle around a group of things, you could point at each “thing” and say within the “context” that is the “this”. Call the chaulk circle the object, within the object the things are referred to as the contextual this.
Routing refers to how an application’s endpoints (URIs) respond to client requests… You define routing using methods of the Express app object that correspond to HTTP methods; https://expressjs.com/en/guide/routing.html
A route method is derived from one of the HTTP methods, and is attached to an instance of the express class.
Route paths, in combination with a request method, define the endpoints at which requests can be made. Route paths can be strings, string patterns, or regular expressions.
When you are wanting to provide multiple callback functions that behave like middleware to handle a request, they might have to utilize the ‘next’ in order to side step the remaining route call backs. You can use next to tell the route how to play, then pass the baton onto the next route if there is no reason to continue on the current one.
Provides routing API’s like .use, .get, ect.
Route middleware in Express is a way to do something before a request is processed. This could be things like checking if a user is authenticated, logging data for analytics, or anything else we’d like to do before we actually spit out information to our user. https://www.digitalocean.com/community/tutorials/learn-to-use-the-new-router-in-expressjs-4
I’m excited to see what all we can do with the express router after reading about all the good it can do for a server.