ember-cli-inject-live-reload
ember-cli-inject-live-reload copied to clipboard
Allow forcing localhost when not using Ember-CLI to serve project
Related to issue #13 -
We don't use ember-cli to serve our dist/ directory. We also use a non-standard local hostname.
This change adds a liveReloadForceLocalhost
option to force the addon to expect the livereload script on a fully-qualified localhost URL (rather than a relative path).
Ember-CLI's baseURL
and port
options are respected.
It could be further generalized to be more customizable, but my assumption is that CLI will really only be used on localhost. Since there's already a semi-hardcode (location.hostname || 'localhost'
), this seems reasonable to me.
To use,
# file .ember-cli
{
"liveReloadForceLocalhost": true
}
Seems to be working for us - let me know what you think! Thanks, -david
I think this is fixed for you in the current version. https://github.com/rwjblue/ember-cli-inject-live-reload/blob/master/index.js#L19 . Now it automatically uses the current hostname.
Hey @jrobeson - that's actually the problem in my case.
During development, our application is served from a non-standard host/IP through apache, and our environment does not allow for ember-cli to bind to that host.
I want to serve the application from some weird IP, but serve the livereload script from ember-cli on localhost.
The people in issue #13 seem do have similar needs.
We have similar needs and were able to solve them with the changes in #25 and #36.