慕课es6实战的例子,gulp任务脚本已经写好,输入gulp -watch命令,没有报错,但是没有reload的,无法访问loclhost:3000。想问下这是啥原因?谢谢!server文件代码import gulp from 'gulp';import gulpif from 'gulp-if';import liveserver from 'gulp-live-server';import args from './util/args';gulp.task('serve',(cb)=>{ if(!args.watch) return cb(); var server = liveserver.new(['--harmony','server/bin/www']); server.start(); gulp.watch(['server/public/**/*.js','server/views/**/*.ejs'],function (file) { server.notify.apply(server,[file]); }) gulp.watch(['server/routes/**/*.js','server/app.js'],function () { server.start.bind(server)() });})
添加回答
举报
0/150
提交
取消