Hacker News new | ask | show | jobs
by smcleod 3909 days ago
Can someone explain to me the advantages of this over using nginx?
1 comments

In a lot of cases, nginx is overkill. It's also more focused on being a reverse proxy, while ran is more for simply serving static files. Ran also comes with a cli and some other neat features that would be useless in most cases when working with nginx.
What's the disadvantage to being "overkill" that this remedies? nginx is very easy to install, and a static web server configuration is pretty much the default one. Is this faster? Does it use less memory?
I think the main advantage here is that it's a one-binary-file webserver. Very simple to install and ideal for file sharing among coworkers or similar situations. A modern equivalent of "python -m SimpleHTTPServer".
Yes, "python -m SimpleHTTPServer" is too slow.
Too slow for what?
'python -m SimpleHTTPServer' is actually fairly terrible if you try to use it to share a file amongst coworkers. Try it and you'll see, downloads will actually fail.

It also freaks out if the root dir is blown away, which can be quite common if you're trying to use it with a static site generator.

'python -m SimpleHTTPServer' is great for serving files to yourself but that's about it.