Objectives
-
You will understand basics of HTTP which powers the web
-
You will be able to build custom web application servers
-
You will understand how to inspect HTTP with a VS Code extension
-
You will be able to generate
fetch
code andcurl
calls using the VS Code extension
- You will understand how to create a basic express app
- You will understand how to use
router
directly and also the alternatives ofget
,all
andpost
- You will be be able to write code without using
router
directly and instead use the alternatives ofget
,all
andpost
Node http which Express builds functionality onto and what Express adds for functionality
https://blog.risingstack.com/your-first-node-js-http-server/
Installing Express into any Node Project
npm install --save express
Installing Nodemon for Fast Development
npm install --save-dev nodemon
Nodemon
Express
https://www.npmjs.com/package/express
Express Listen Function
https://expressjs.com/en/api.html#app.listen
Express Route
https://expressjs.com/en/api.html#app.route
Express Static file delivery
https://expressjs.com/en/starter/static-files.html
Express get
Function
https://expressjs.com/en/api.html#app.get.method
Express post
Function
https://expressjs.com/en/api.html#app.post.method
Express all
Function
https://expressjs.com/en/api.html#app.all
Express Response send
Function
https://expressjs.com/en/api.html#res.send
Express Response sendStatus
Function
https://expressjs.com/en/api.html#res.sendStatus
Express Request Params
https://expressjs.com/en/api.html#req.params
Express Response Status Function