I create Node.js applications and I use nginx as a reverse proxy. My application has some static files that I need to serve, and a Socket.io server.
I know that I can serve static files directly using Express (using express.static middleware). I can also point nginx directly to the directory where my static files are located, so they will be served by nginx.
So the question is: which one is the best approach? What pros and cons can I encounter when using each approach?
source
share