Hacker News new | ask | show | jobs
by yuvadam 1870 days ago
I'm always surprised that nginx doesn't have a nice way to run as a single-liner command.
2 comments

What would be the use case? These are useful for experimenting and doing something ad-hoc, but once you deploy to a serious environment not being a one-liner is irrelevant. On the other hand supporting that special case has its own costs.
I think it makes sense since it is completely driven by its config and adheres to the Unix philosophy of doing one thing well and not clutter the binary with additional stuff for fringe use cases. It would make the now surprisingly simple cli arguments more complex.

It should be trivial to write a shell script or alias that templates `root $(pwd);` and invokes `nginx -c /tmp/nginx.conf`

> adheres to the Unix philosophy of doing one thing well and not clutter the binary with additional stuff for fringe use cases

Nginx? Really? "One" thing? Try running `./configure --help` in the Nginx source dir...