bmustiata / fast-live-reload

A live reload that works with all the possible browsers.
18 stars 5 forks source link

Port for client notification #1

Closed bbasic closed 8 years ago

bbasic commented 8 years ago

Hi, first of all I find your work really interesting and to be useful. I am not familiar with any other approaches for live reloading as fancy as yours, so I am eager to use it in my daily work.

The question that I have is in using the port -p xxxx flag to specify a port on which clients can check if the page reload should occur or not.

I was a bit surprised to see that clients still send ajax calls to the default port 9001 although I specified for example the port 9003

fast-live-reload -s http://localhost:9002/ \
-ep "sbt -Dhttp.port=9002 ~run" \
-p 9003 

Is it possible to prepare the injected script client-reload.js to consider the specified port? Without resorting to Client Configuration by setting fastLiveReloadHost somewhere?

Thanks and keep up the good work. Cheers!

bmustiata commented 8 years ago

Hi @bbasic,

Thank you for your bug report. It's fixed it now, so it defaults, in case the configuration is not set, to the request host + the given client port.

Updating to the latest version (v2.5.2) using npm install -g fast-live-reload should do the trick.