Noob question: Alternatives to `python3 -m http.server`?
Trying to hack some HTML and CSS. Are there anything like the above that can serve a local website to localhost, be built on Linux and refreshes the page when files are changed?
There is live-server on npm but I was hoping for something that is available in my distro's package manager (or if it isn't I can add it). Hugo has a serve mode that does exactly this but it is limited to hugo projects.
Any input is appreciated. Thanks.
schwartz - 5.4yr
For autorefresh you could combine your server of choice with ENTR. Entr watches the files and reruns the command if anything changes.
3
bLeDy - 5.4yr
There's a useful VSCode extension that i use, dunno if it matches your use case
2
ogatoamarelo - 5.5yr
I use php -s 0.0.0.0 and have that aliased to serve
1
ksynwa - 5.5yr
This is very good but it doesn't auto refresh sadly
ksynwa in webdev
Noob question: Alternatives to `python3 -m http.server`?
Trying to hack some HTML and CSS. Are there anything like the above that can serve a local website to localhost, be built on Linux and refreshes the page when files are changed?
There is
live-serveron npm but I was hoping for something that is available in my distro's package manager (or if it isn't I can add it). Hugo has a serve mode that does exactly this but it is limited to hugo projects.Any input is appreciated. Thanks.
For autorefresh you could combine your server of choice with ENTR. Entr watches the files and reruns the command if anything changes.
There's a useful VSCode extension that i use, dunno if it matches your use case
I use php -s 0.0.0.0 and have that aliased to serve
This is very good but it doesn't auto refresh sadly
Perhaps it's a bit dated but there's a nice list here: https://github.com/hasura/awesome-live-reloading
Pro tip if you don't want to
npm install -ga package you can runnpx live-serverand it will download and run it right away without installing!