$chiubaca / notes / fleeting / 2021-02-21
  • Learning the features of Express.js. When creating a web server using node.js reading and working with data, response headers can get messy very quickly. Express makes this easier by abstracting these processes away with “middleware”. Express Middleware can do an arbitary action, using this pattern there many other pre-created and third-party middleware which we can make use of. Some frequenlty used ones is express.Router() which let your programme actions depending on the URI. Another is bodyParser which let your tap into the req.body.message property to access the payload without needing to work with data streams. There are many more express middleware available!
Edit on GitHub ✏️

Hey I'm Alex Chiu 👋. These are my notes for literally anything.

I'm using the Zettelkasten method to organise my thoughts here.

My more polished writings are published to my main blog at chiubaca.com

Follow me on: Github / X (Twitter) / Mastodon / LinkedIn