Open stephenkoo opened 6 years ago
If this isn't a planned feature, could someone suggest what they use to automatically refresh a browser to reflect the latest changes?
i need to check how its work a browser refresh system
I think air & fresh does this: https://github.com/pilu/fresh https://github.com/cosmtrek/air
Edit: Just tested air, it doesn't seem to do this. Best resource I've found is:
Great Idea.
I've been spending ages looking for a tool that does this in golang, I've become accustomed to it from other languages' web frameworks (which recompile and auto refresh the browser on file changes), this would be an awesome addition!
The way I imagine this working is we would include some javascript in our app which could be loaded from the realize web server
<script src="http://localhost:5001/autorefresh.js"></script>
(we could do this conditionally depending if we're running in production mode or not, I don't think it would be wise or worth the effort to have Realize proxy the app and inject the script)
I would contribute if you're desperate for someone else to do this, but I'm quite new to go - to the point where I'm looking for the best frameworks and code reload tools :-)
It seems that most of what needed would be in the example https://github.com/markvincze/golang-reload-browser that @stephenkoo posted.
i prefer the proxy approach, but i don't know how to get the app url that could be preset or not depending on the type of project
Proposed feature:
realize start
rebuilds the Go binary file.