I want use gulp reload on my workflow, but I have trouble with it. When I started via "gulp" command in command line I have server connection, but when I go to my browser there is the massege "Cannot GET /" What is it, and how can I solve this problem? Help please.
I have next gulpfile.js:
/**
* Created by adm on 4/24/2016.
*/
var gulp = require('gulp'),
rename = require('gulp-rename'),
minifyCSS = require('gulp-minify-css'),
notify = require("gulp-notify"),
livereload = require('gulp-livereload'),
connect = require('gulp-connect');
/*----------Local Server connect----------*/
gulp.task('connect', function() {
connect.server({
root: 'traning_js_skils',
livereload: true
});
});
/*----------HTML----------*/
gulp.task('html', function () {
gulp.src('./src/index.html')
.pipe(connect.reload());
});
/*----------CSS----------*/
gulp.task('css', function() {
return gulp.src('css/*.css')
.pipe(minifyCSS({keepBreaks:true}))
.pipe(rename('common.min.css'))
.pipe(gulp.dest('testfiles/'))
.pipe(livereload());
/*.pipe(connect.reload());*/
/*.pipe(notify('Done!'))*/
});
/*----------Watch----------*/
gulp.task('watch', function () {
livereload();
gulp.watch('css/*.css', ['css']);
gulp.watch('index.html', ['html']);
});
gulp.task('default', ['css', 'watch', 'connect']);