Disable / turn off LiveReload server in Emberjs / Ember-cli
Asked Answered
J

3

27

I use Cloud9 IDE, which only exposes port 80 and prevents LiveReload from connecting. I get this error:

GET https://myapp.c9.io:35729/livereload.js?snipver=1 net::ERR_CONNECTION_REFUSED

Unless someone knows of a fix, I'd like to simply turn this feature off / disable it.

I'm running Ember-cli and I can see the task in ember-cli/lib/tasks/serve.js and I've commented it out, but it didn't do the trick:

/*
    var liveReloadServer = new LiveReloadServer({
      ui: this.ui,
      analytics: this.analytics,
      watcher: watcher
    });
*/

It's buried in enough places that I'm afraid to npm remove it, as I think that would just create bigger problems.

Jardiniere answered 29/7, 2014 at 23:59 Comment(0)
B
49

You should be able to disable live reload by starting your sever like this:

ember server --live-reload=false

Brocky answered 30/7, 2014 at 2:25 Comment(0)
H
15

With the addition of the .ember-cli config file, you can just add "liveReload": false to it. Example '.ember-cli' file

{
"port": 9999,
"host": "0.0.0.0",
"liveReload": false,
"proxy": "http://aqueous-bayou-5108.herokuapp.com/",
"environment": "development"
}

Edit: live-reload was changed to liveReload in this commit

Hargis answered 16/10, 2014 at 5:22 Comment(2)
Note, the correct format is liveReload (with camelCase)Trueblue
Good catch. Updated the post with liveReload.Hargis
N
2

In addition to @Dhaulagiri's answer, you can use:

ember server -lr false
or
ember s -lr false

For all the options:

ember help server

Nuthouse answered 26/9, 2017 at 7:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.