colindean / hejmo

My home directory and package management stuff, inelegant as it may be
17 stars 1 forks source link

serve should use miniserve and fall back to Python #15

Open colindean opened 4 years ago

colindean commented 4 years ago

https://github.com/colindean/hejmo/blob/master/scripts/serve current uses a Python 2.x invocation. It should check for miniserve and use that if it's available (since it's a part of my standard Brewfile.all installation base), falling back to Python 3.x python -m http.server then back to its current implementation. It might be a fun exercise to drop in a few other alternatives, e.g. lighthttpd in a docker container (docker run -d --name lighttpd -p 80:80 gists/lighttpd) or this Ruby one-liner (ruby -run -e httpd . -p 5000).

colindean commented 4 years ago

I found this absurd list of one-liners, many of which do not require external packages, which is a requirement of this beyond miniserve.

https://gist.github.com/willurd/5720255