This would make SQLite example supported: https://news.ycombinator.com/item?id=27016630
Big list of HTTP static server one-liners
11–20 of 100 posts
Re: Big list of HTTP static server one-liners
#12Re: Big list of HTTP static server one-liners
#13The ruby one with the -run option is a bit nonintuitive in how it works. $ ruby -run -ehttpd . -p8000 The -r option requires un.rb[1] which is a file full of convenience functions, such as httpd in this example. Classic Ruby. Given that go has popularized long args with a single hyphen (-name etc), it is easy to mistake -run as an option by itself. [1] https://github.com/ruby/ruby/blob/master/lib/un.rb#L323
Why did they do that?
It took us 20 years to standardize on - for short and -- for long, with occasional finger rage on tar or find, and now this?
What were they thinking?
Re: Big list of HTTP static server one-liners
#14The ruby one with the -run option is a bit nonintuitive in how it works. $ ruby -run -ehttpd . -p8000 The -r option requires un.rb[1] which is a file full of convenience functions, such as httpd in this example. Classic Ruby. Given that go has popularized long args with a single hyphen (-name etc), it is easy to mistake -run as an option by itself. [1] https://github.com/ruby/ruby/blob/master/lib/un.rb#L323
> go has popularized long args, with a single hyphen (-name etc) Why did they do that? It took us 20 years to standardize on - for short and -- for long, with occasional finger rage on tar or find, and now this? What were they thinking?
Re: Big list of HTTP static server one-liners
#15Re: Big list of HTTP static server one-liners
#16Re: Big list of HTTP static server one-liners
#17Earlier quoted context omitted.
> go has popularized long args, with a single hyphen (-name etc) Why did they do that? It took us 20 years to standardize on - for short and -- for long, with occasional finger rage on tar or find, and now this? What were they thinking?
The XWindow system used -long -opts long before that.
But the vast majority of modern command line tools agree on --long.
Re: Big list of HTTP static server one-liners
#18I'm always surprised that nginx doesn't have a nice way to run as a single-liner command.
Re: Big list of HTTP static server one-liners
#19 while true; do cat index.html | nc -l 9999 -q 1; echo -e "\n---"; doneRe: Big list of HTTP static server one-liners
#20Is there a way of doing that in a Windows without installing anything?
https://www.betterhostreview.com/turn-on-iis-windows-10.html