2 ms·
"complicate" your lives? nginx is an amazing piece of technology and it's extremely simple. It's built for serving static files (and doing other things) better
by staunch 15y ago
"complicate" your lives? nginx is an amazing piece of technology and it's extremely simple. It's built for serving static files (and doing other things) better than anything else that exists. Use the right tool for the job.
- devrim 15y agoi wasn't saying nginx is bad (nginx is awesome). i just wouldn't want to deploy and configure nginx with my app, if i can avoid it. in fact i got an awesome suggestion over at stackoverflow, that put the usage down to 0.3% http://d.pr/dXVR http://d.pr/dXVR
- bmelton 15y agoIf it's an app you in tend to package up, or is portable, that might be an acceptable solution, but in the long term, using Nginx or Varnish (or even Apache) is likely the better answer, unless it is your objective to build a static file server in Node. Otherwise, even if you can speed it up, and/or minimize its memory usage, you're still wasting cycles and memory in your app that needn't be spent on it. To a point, this is perfectly fine, but at some point, you're (hopefully) going to want to scale, and I promise that this is the first thing you'll want to look at.