georgesamper
georgesamper

Reputation: 5179

Nodejs webserver for production

A little update to the common question. As of the current version of Nodejs v0.6.5, is it safe to run it as a webserver in production? I really wanna skip the step of using nginx for example for proxy. I am gonna use Expressjs, nowjs, gzippo. And nginx doesnt support websockets yet, and it's a little hard to setup socket.io over ssl. Are there any more benfits to nginx other than that it serves static files better?

Any advice on this matter? And if it's ok to run as a webserver, are there any other modules worth concidering?

Upvotes: 2

Views: 1312

Answers (2)

Ryan Gibbons
Ryan Gibbons

Reputation: 3601

Other benefits of Nginx besides serving static files.

  • You can have it compress dynamically or load up a .gz file even if the non-compressed is reqeusted.
  • You can cache the generation of anything, reducing a call back to node.js.
  • You can have it route to a cluster of node application servers
  • Lots of other neat stuff http://wiki.nginx.org/Modules

Using nginx though isn't required, and running node with nothing in front of it is perfectly fine.

Upvotes: 2

alessioalex
alessioalex

Reputation: 63683

To be honest aside from serving static file I don't really see any important benefits (though Nginx may have more server-specific extensions).

Also you might want to use bouncy or node-http-proxy for proxying and browserify to use you server-side modules on the frontend.

Edit: also you would not be the first using Node without Nginx, as far as I know Trello and other websites are also using it.

Upvotes: 3

Related Questions