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

Allow forcing localhost when not using Ember-CLI to serve project #22

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

davidgovea
Copy link

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

@ghost
Copy link

ghost commented Jun 5, 2015

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.

@davidgovea
Copy link
Author

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.

@lukemelia
Copy link
Contributor

We have similar needs and were able to solve them with the changes in #25 and #36.

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

Successfully merging this pull request may close these issues.

2 participants