Some great things that Express allows you to do:
- Easily write request handlers! Request handlers are instructions on what to do when an HTTP request comes in. Here’s a simple example that says “when you hear a ‘GET’ request for the path ‘/’, send them all the categories.
- Incorporate middleware! Middleware are various steps that serve all kinds of useful functions like handling any errors that occur, authenticating users, or logging requests to the console so you can see them as they occur. Static() is a useful built-in middleware that serves up static files like HTML and CSS files so they’re sent along with any request.
- Incorporate databases! Express doesn’t care which database you like, it’ll make it work. You can require your database and then perform any CRUD (create, read, update, delete) operation on your instances.
So that’s a brief overview of Express! It’s non-judgmental about a lot of things, like how your organize your files, which modules you use or create, and which database mechanism you prefer. It’s also bare-bones, meaning that a lot of its power comes from learning which libraries to use to complete certain tasks. I’m definitely still figuring out my preferred setup, and I’ll let you know as I figure out more of my preferences.