浏览器与gulp和Ghost博客同步
我正在运行一个Ghost博客,这个博客只是以npm start
然后运行在http://lolcahost:2368
我有浏览器同步设置运行在我的gulpfile像这样:
gulp.task('default', function() { browserSync.init(null, { server: { proxy: 'http://localhost:2368' } }); });
虽然没有看到工作。 它在我的浏览器上启动localhost:3000
但只是在完全空白的白页上显示一条消息: Cannot GET /
我在这里做错了什么? 当我访问Ghost创build的localhost:2368
,我可以看到这个网站很好。
我的猜测是你的configuration错误,
它应该是这样的:
gulp.task('default', function() { browserSync.init({ proxy: 'http://localhost:2368' }); });