So far, I see these benefits:
However, routing is very easily done with if statements and regex (that's what I do in Perl and Java already), and postdata and static file serving - well there's a module for that. So is it just that Express handles these things out of the box or is there a more significant feature I'm missing?
Maybe it's my point of view.. I'm writing my own webserver as part of a larger project, so maybe it's just that I'm replacing Express' more obvious features whereas many developers expect a webserver to be useable right out of the box?
On the other hand, I thought that people commonly made apps that listen on a TCP port, and then use ngix or some other HTTP proxy server for routing? Is Express supposed to replace this model?
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:
put
, get
, post
, etc..., wildcard handling, variables pulled automatically from URLs, etc...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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With