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

Livereload port stays 35729 in default script when configured #41

Open
suricactus opened this issue Sep 1, 2015 · 2 comments
Open

Livereload port stays 35729 in default script when configured #41

suricactus opened this issue Sep 1, 2015 · 2 comments

Comments

@suricactus
Copy link

I'm starting server like this gulfile.js:

gulp.task('serve', function() {
  var server = gls([gls.script, 'public', 9200], undefined, 9300);
  server.start();
  gulp.watch(['./dist/**/*.js', './public/**/*'], function (file) {
    server.notify.apply(server, [file]);
  });
});

Everything seems ok:

$ gulp serve
[14:26:54] Using gulpfile ~/work/tblib/trunk/web/tbjs/gulpfile.js
[14:26:54] Starting 'serve'...
[14:26:54] Finished 'serve' after 126 ms
livereload[tiny-lr] listening on 9300 ...
folder "public" serving at http://localhost:9200

But when I check the source:

<script>//<![CDATA[
document.write('<script src="//' + (location.hostname || 'localhost') + ':35729/livereload.js?snipver=1"><\/script>')
//]]></script>

I've tracked the problem - the livereload settings are not passed in ./scripts/static.js so livereload uses it's default port.

@nelsoncf
Copy link

nelsoncf commented Jul 15, 2016

Hey, I had a problem just like that and it was driving me crazy, but seems like it doesn't work with implicit html tags, so if you have something like this:

`<!doctype html>

<title>implicit</title>`

It won't work, you have to do this:

`<!doctype html>

<title>full doc</title> `

this worked for me, the orginal solution I've found in here:
http://stackoverflow.com/questions/27215362/browser-sync-under-gulp-doesnt-refresh-browser

@EvanLomas
Copy link

Will this issue ever be fixed?

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

No branches or pull requests

3 participants