Closed heinhoang closed 6 years ago
You have 2 options.
1
fast-live-reload
can serve local content, or proxy a site, and inject the reloading script into it. If you don't have some fancy redirect to the original site for security, you can just:
flr -s http://localhost:8000/ ./public
2 Manually injecting the client javascript
If you do have redirects, you can manually insert the reloading script (you can get it with bower install fast-live-reload
), and then:
flr -ns ./public
This won't start any server to serve content, except the reloading one.
"fast-live-reload": "^2.7.6" (npm i -D fast-live-reload)
I use express-generator to generate nodejs app (it's using handlebars). The app runs on http://localhost:3000 I want to hot-reload css/js after changing css/js in public folder. So, how to do that? I setup likes this
fast-live-reload http://localhost:3000
and thisfast-live-reload -s ./public/ -p 3000
but it's not working