Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Live reload #1459

Open
keybits opened this issue Oct 31, 2024 · 3 comments
Open

Feature request: Live reload #1459

keybits opened this issue Oct 31, 2024 · 3 comments

Comments

@keybits
Copy link

keybits commented Oct 31, 2024

Would you consider adding optional live reloading of files when they change?

I currently use devd for this. It's similar to miniserve in that it's a single binary for serving files over http. It has a live reload option which is very handy for local web development.

devd works fine, but development has stopped and miniserve has some features not available in devd. It'd be great to use just one tool.

@svenstaro
Copy link
Owner

I suppose you don't only want to live reload the file tree but also the contents of file. I'm not really sure how that would work. We can't live reload everything and we'd need to inject something into pages to make it work?

@keybits
Copy link
Author

keybits commented Oct 31, 2024

we'd need to inject something into pages to make it work?

Yes, that's how devd works

Since it's optional, it only happens when live reloading is enabled with sometthing like -l in the command invocation.

For filesystem watching devd uses it's own Go filesystem watching library moddwatch.
In the Rust world, I believe notify would be a good option as it's battle-tested and cross-plaform.

No problem if this is out of scope and would bring in too many dependencies.

@svenstaro
Copy link
Owner

I'm not opposed to this if it doesn't introduce too much new code. If you like, you can throw together a quick PoC and I can take a look at that with no promises made as to its inclusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants