Comment by vessenes
8 days ago
I mean `claude -p "spin up a python webserver in this directory please"` or alternately `python -m http.server 8080 --bind 127.0.0.1 --directory .` is not hard
8 days ago
I mean `claude -p "spin up a python webserver in this directory please"` or alternately `python -m http.server 8080 --bind 127.0.0.1 --directory .` is not hard
Sure, but opening ports tends to be a headache when all you want to do is view the contents.
On this case I wonder if the format can be further optimized. For example, .js files are supported for loading locally and albeit a very inefficient way to load assets, it could overcome this local disk limitation and nobody reads the HTML source code in either way so it won't need to win any code beauty contests. I'll later look into this theory and ping the author in case it works.
> For example, .js files are supported for loading locally
Technically yes, but last time i tried that it gives you CORS errors now. You can start your browser with CORS disabled, but that makes sharing your .html file impossible. So back we go to inlining stuff :)
Yep, inlining it seems. :-(
`npx http-server` anywhere node is installed
althttpd is even easier. :)
Wouldn't recommend, only packaged on Alpine and nix.
It's a single-binary program that's easy to compile. You don't need to depend on packaging...