I'm always surprised that nginx doesn't have a nice way to run as a single-liner command.
It should be trivial to write a shell script or alias that templates `root $(pwd);` and invokes `nginx -c /tmp/nginx.conf`
21–30 of 100 posts
I'm always surprised that nginx doesn't have a nice way to run as a single-liner command.
It should be trivial to write a shell script or alias that templates `root $(pwd);` and invokes `nginx -c /tmp/nginx.conf`
What's a good one that serves gzip assets if they exist? I'm looking for a way to serve a webpack prod build.
I'm always surprised that nginx doesn't have a nice way to run as a single-liner command.
Is there a way of doing that in a Windows without installing anything?
The 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?
They were starting back from the 70s.
Also one more check for go being alt.history.java, this style is also the standard for Java tooling.
And Apple, I think.
How many of these support the partial file loading? I know that Python don’t (I have been working on support for it). This would make SQLite example supported: https://news.ycombinator.com/item?id=27016630
I know this because I have also been working on something using that magic sqlite-in-browser project :D
Earlier 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.
Isn't python's server blocking? If you make two requests simultaneously, one of them will have to wait.
It’s not usually an issue for small stuff, but it does mean you can’t really use this snippet to serve big files for a lan, which is a bit of a surprise the first time you hit that limitation.
The 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?