Answer the question
In order to leave comments, you need to log in
How to set up browsersync in gulp on a remote server to keep the functionality?
I use browsersync in conjunction with gulp. Gulp tracks changes in css, html files and tells the browser to refresh the page. All this works fine on the local machine. Code below.
gulp.task('browserSync', function() {
browserSync.init({
proxy: "test.server",
port: 8080,
open: true,
notify: false
});
gulp.watch("www/static/**/*.scss", ["style"]);
gulp.watch('www/static/common.css').on("change", browserSync.reload);
gulp.watch('www/local/templates/.default/components/**/*.twig').on("change", browserSync.reload);
});
Answer the question
In order to leave comments, you need to log in
You need to forward the local port of the galp outside, and then connect (stupidly open it in the browser) to it by ip-address:port-to-which-you-forwarded
Only there are possible different vyzhyzhy on his part, they say you have the wrong host, or the origin is incorrect, this can be solved by passing through the nginx proxy and changing the headers that he or the browser does not like, for those that do.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question