Answer the question
In order to leave comments, you need to log in
How to make browserSync work with php?
Hello everyone, I can not force the page to be updated when changing php.
galpfile (netology.dev is a host on openserver, added manually, the path netology.dev/php is registered inside it, where the php file itself is stored):
var gulp = require('gulp'),
browserSync = require('browser-sync').create();
gulp.task('server', function() {
browserSync.init({
proxy: "netology.dev/"
});
});
gulp.task('watch', function()
{
gulp.watch('php/*.php', browserSync.reload);
});
gulp.task('default', ['server', 'watch']);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question