Automate your workflow with Gulp: part 3 - live reloading

Abiola Adele Since Aug 17, 2017 2 Posts

Thanks for the Tutorial. Needs a little adjustment.

NB::: 1) The PHP port and the proxy Port are the same 2) browserSync port must be Different the PHP Port as shown bellow..

gulp.task('php', function () { connect.server({ base: "./public", hostname: "localhost", port: 5010 }); });

browserSync({ proxy: '', port: 5000 });

Sharad Sharama Since Nov 24, 2018 21 Posts

I follow the same instructions. I'm using xampp. But it opens the xampp dashboard with the link localhost:4000/dashboard.

My Folder Structure

xampp -> htdocs -> grovetta -> dwayconstruction -> xhtml -> src and where my all files and folder I've fixed also my index.php file.

My Code

// Create a task to serve php gulp.task('php', function() { php.server({ base: './src', hostname: 'localhost', port: 4000, open: false, keepalive: true, }); });

// Start browserSync server gulp.task('browserSync', function() { browserSync.init({ baseDir: './src', proxy: "", port:4000, }) });

But when I run the Gulp it opens dasboard of xampp which was wrong. I need to open my index.php file which was inside src folder.

What is wrong with my code?