express static Flashcards
What does express.static() return?
files that are in the root, or specified directory
MIDDLEWARE FUNCTION
What is the local __dirname variable in a Node.js module?
directory (file) name of current module’s absolute path
What does the join() method of Node’s path module do?
method joins all given path segments together.
What does fetch() return?
returns a promise that resolves with a json method of the response object
What is the default request method used by fetch()?
get request
How do you specify the request method (GET, POST, etc.) when calling fetch?
specify in the options parameter by setting the method: property.
When does React call a component’s componentDidMount method?
after the render method
Name three React.Component lifecycle methods.
Constructor()
render()
componentDidMount()
How do you pass data to a child component?
pass an array of objects to state