Answer the question
In order to leave comments, you need to log in
When running gulp watch in a browser, Cannot GET /?
Hello! Help me understand what's going on here? I run gulp watch in the browser and the message is Cannot GET/
Here is the complete golpfile:
var gulp = require('gulp'),
sass = require('gulp-sass'),
browserSync = require('browser-sync');
gulp.task('sass', function() {
return gulp.src('app/sass/**/*.sass')
.pipe(sass())
.pipe(gulp.dest('app/css'))
.pipe(browserSync.reload({stream: true}))
});
gulp.task('browser-sync', function() {
browserSync ({
server: {
baseDir: 'app'
},
notify: false
});
});
gulp.task('watch', ['browser-sync', 'sass'], function() {
gulp.watch('app/sass/**/*.sass', ['sass']);
gulp.watch('app/*.html', browserSync.reload);
gulp.watch('app/js/**/*.js', browserSync.reload);
});
Answer the question
In order to leave comments, you need to log in
In my case, after the name of the localhost, it was necessary to add a specific page
localhost:8000/front-page.html
I also learned the same lessons, by the way. Did you run other tasks before launching gulp watch?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question