I would like to add gulp, sass and browsersync to my toolkit. Now I run gulp with sass and browsersync settings.
I am hiding a php application running from vhost on my local Apache server.
I am trying to start browsersync from a view task using the browserersync proxy option to use my vhost.
Currently, when I start the clock, the server cannot be found on port 3000. If I go to "localhost: 3000", I get an error message without a web page.
If I go to port 3001, I can access the browser admin interface. Therefore, I know that the browser is working.
My gulp conf is as follows
var gulp = require('gulp'), sass = require('gulp-ruby-sass'), browsersync = require('browser-sync') ; gulp.task('sass', function() { return sass('assets/sass/main.sass') ; }) ; gulp.task('browser-sync', function() { browsersync({ proxy: 'localhost', port: '3000' }); }); gulp.task('browsersync-reload', function () { browsersync.reload(); }); gulp.task('watch', ['browser-sync'], function () { gulp.watch('assets/sass/**/*', ['css']); }); gulp.task('default', ['sass'], function() { gulp.watch("assets/sass/**.*", ['sass']); });
source share