Fazal Rasel
Fazal Rasel

Reputation: 4526

browsersync not working on offline

I got an weird issue. BroswerSync works fine when i am on online(connected by wimax) but not working or launching browser when I on offline. Few days back, same issue happened with livereload. What might be the problem?

Here is simple code on gulpfile.js

var gulp = require('gulp');
var browserSync = require('browser-sync');

gulp.task('browser-sync', function () {
    browserSync.init({
        server: {
            baseDir: './'
        }
    })
});

when i run gulp command showing-

$ gulp browser-sync
[23:25:12] Using gulpfile e:\myapps\gulp-browsersync\gulpfile.js
[23:25:12] Starting 'browser-sync'...
[23:25:13] Finished 'browser-sync' after 119 ms

and stopped..

Upvotes: 1

Views: 1124

Answers (2)

Fazal Rasel
Fazal Rasel

Reputation: 4526

In my Case I just change

proxy: 'localhost:80'

to

proxy: '127.0.0.98:80'

and its start working..

Upvotes: 2

flepp
flepp

Reputation: 36

I might be missing something here, but have you tried setting browserSync options to offline : true ? If not, this may very well be the problem.

Link : http://www.browsersync.io/docs/options/#option-online

Upvotes: 1

Related Questions