var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var nodemon = require('gulp-nodemon');
gulp.task('server', function() {
nodemon({
script: './bin/www',
ignore: ['.vscode', '.idea', 'node_modules'],
ext: 'js json html jade css'
})
.on('start', function() {
browserSync.init({
proxy: 'http://localhost:3000',
files: ["public/**/*.*", "views/**/*.*", "routes/**/*.*"],
// port: 8080
}, function() {
console.log("....");
})
// gulp.watch("views/*.jade")
})
})
这是gulpfile文件
欢迎选择我的课程,让我们一起见证您的进步~~