What are the benefits of Express over plain Node.JS? What are the benefits of Express over plain Node.JS? express express

What are the benefits of Express over plain Node.JS?


You can read for yourself the API that Express offers here and get a direct feel for what it adds to the base http server.

A partial list of features:

  • All sorts of routing features including routing, separate handlers for put, get, post, etc..., wildcard handling, variables pulled automatically from URLs, etc...
  • Sub routers
  • Static file serving
  • A framework that many popular template engines plugin to
  • View caching
  • Routing by case sensitivity or no case sensitivity
  • A middleware framework which tons of third party NPM modules plug into
  • eTag support
  • All sorts of useful properties and methods to query info on the request
  • All sorts of methods for constructing the response

Most folks building a web app would prefer to start with a web server and a framework and be able to use a wide variety of pre-built NPM modules that work with the framework rather than build all that stuff themselves.

nginx is sometimes used in concert with node.js (it has many features), but not usually as the main functionality that Express offers.


The documentation of Node is so bad, you barely can use it.
Express instead shows clearly what they offer and how you can use it.
One big reason against Node.

Let's take the Response Object as an example:

Node Documentation:
https://nodejs.org/api/http.html

Express Documentation:
http://expressjs.com/en/api.html#res