I
I
Isetmiks2020-07-27 20:31:24
open server
Isetmiks, 2020-07-27 20:31:24

BrowserSync - proxy not working (OpenServer)?

Install elementary gulp with one package (BrowserSync) to run the OpenServer site.

var gulp         = require('gulp'),
    browserSync  = require('browser-sync').create();
gulp.task('browser-sync', function() {
  browserSync.init({
    proxy: "site.local",
    browser: "chrome",
    notify: false,
  })
});
function bsReload(done) { browserSync.reload(); done(); };
gulp.task('default', gulp.parallel('browser-sync'));


Everything starts, there are no errors in the console.
[19:39:41] Using gulpfile /mnt/e/project/site/local/gulpfile.js
[19:39:41] Starting 'default'...
[19:39:41] Starting 'browser-sync'...
[Browsersync] Proxying: http://site.local
[Browsersync] Access URLs:
 ------------------------------------
       Local: http://localhost:3002
    External: http://192.168.1.6:3002
 ------------------------------------
          UI: http://localhost:3003
 UI External: http://localhost:3003
 ------------------------------------


If you go directly: site.local (the site is working)
If you go to the created BrowserSync Local: localhost: 3002 (eternal loading and that's it)

I turned off the antivirus, the firewall, nothing helps.

If you start the proxy (by specifying another gulp that is already running): localhost:3000 then it works.

Changed port, does not help!

The problem is somewhere inside.
If who faced, the decision of the given problem is necessary. Thanks in advance for all your answers!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question