What is Express?
It’s not necessary to use Express to employ Node’s HTTP request response cycle. In fact, the following code creates a server that can run on port 3000, allowing a user to go to “localhost:3000/” and see the string “Hello World!” without using Express.
However, Express makes it easier to define routes and set up some basic specifications for an app. After installing Express, this code should also render “Hello World!” at “localhost:3000/”:
Express’s website describes the framework as”fast, unopinionated, minimalist.” This is because it’s a small framework that lets the individuals developing an app decide on the file structure, which middleware to use, etc. This is different from frameworks like Ruby on Rails that always have the same predefined structure, regardless of the type of application.
This unopinionated approach can enable developers to build lighter weight applications, since they are able decide on the structure and the tools appropriate for their specific project.
Express used in production by some high profile companies (Uber, IBM, MuleSoft, to name a few) and MERN and MEAN stacks are a popular choice for modern applications.