About deploying a Node.js application, I have seen a lot of tutorials showing it deployed side-by-side with Nginx, with more or less pretty tricks to allow the 2 to work together (and annoying stuff, like Nginx not supporting WebSockets). This seems a bit complicated to me …
Why does everybody do this kind of setup ?
Does deploying Nginx when you have Node.js provide any advantage ?
Can’t you serve static files with Node.js ?
I’ve written a lot of apps in Django, and the doc says that you shouldn’t use Django to serve static files cause it’s not optimized for this and so on … so I was thinking maybe this is the reason.
Well some people don’t mind using Node instead of nginx.
Certain clouds like dotCloud or Nodejistu uses gateways entirely written in Node.js. Mostly to be able to handle websockets. But also because Node.js is damn fast.
Here is the gateway of dotCloud which has been open sourced recently https://github.com/dotcloud/hipache