Hacker News new | ask | show | jobs
by bradleyland 5649 days ago
If you're using Node as an app server in the context of a larger website with other components, yes. However, if your app is primarily Node.js driven, you may not want Apache standing in the way. Node.js is used to drive some really cutting edge services like WebSockets. I have no idea how gracefully Apache proxies something like WebSockets to a back end app server. I have a feeling the Apache worker process gets tied up for the duration of the socket session. That's not good.

If your entire website is run by your Node.js app, a better approach would be to use Node.js as your primary app/web server, and embed your static assets using a separate domain. For example, you'd use static.mydomain.com for all your static assets, which would point to Apache/Nginx, while your page requests are all handled by Node.js.