gulp + browser-sync Cannot GET / error

前端 未结 8 2536
悲哀的现实
悲哀的现实 2021-02-15 12:40

I am learning the front-end build system currently gulp, i want to use brower-sync and the problem is it is not throwing an error in the commad line but instead when it brings

相关标签:
8条回答
  • 2021-02-15 13:17
    gulp.task('serve',['sass'], function() {
        bs.init({
            server: "./app",
            startPath: "/index.html", // After it browser running
            browser: 'chrome',
            host: 'localhost',
            port: 4000,
            open: true,
            tunnel: true
        });
    
    0 讨论(0)
  • 2021-02-15 13:19
    gulp.task('browser-sync', function() {
        browserSync({
    
          server: {
                baseDir: "./"
                },
    
                port: 8080,
                open: true,
                notify: false
        });
    });
    
    0 讨论(0)
提交回复
热议问题