Express JS Flashcards
What is Express JS?
A Node.js framework designed for building APIs, web applications, and cross-platform mobile apps.
routing
Refers to how an application responds to client requests to a particular endpoint, which is a URI (or path) and a specific HTTP request method.
https://expressjs.com/en/starter/basic-routing.html
route parameters
A placeholder where a user provides the data. We use request and params to access the data and build logic.
Example: http://localhost:5000/api/data/:productID
get query strings and parameters
example: test.com/query?name=jim&id=5
link: https://stackabuse.com/get-query-strings-and-parameters-in-express-js/
middleware
app.get(“/”, (req, res) => {res.send(“<h1>test</h1>”)})
listens for a get request to the homepage (“/”) and sends a response.
app.use()
app.use(express.static())