gulpfile.js
function startServer() {
    var defer = q.defer();

    var serverConfig = {
        server: {
            baseDir: wpath,
            directory: true
        },
        startPath: 'docs/index.html',
        // browser: "google chrome",
        logPrefix: 'SERVER'
    };
    browserSync.init(serverConfig, defer.resolve);

    return defer.promise;
}
function startServer() {
    var defer = q.defer();

    var serverConfig = {
        server: {
            baseDir: wpath,
            directory: true
        },
        startPath: 'docs/index.html',
        // browser: "google chrome",
        logPrefix: 'SERVER'
    };
    browserSync.init(serverConfig, defer.resolve);

    return defer.promise;
}
function startServer ( ) { var defer = q . defer ( ) ; var serverConfig = { server : { baseDir : wpath , directory : true } , startPath : 'docs/index.html' , // browser: "google chrome", logPrefix : 'SERVER' } ; browserSync . init ( serverConfig , defer . resolve ) ; return defer . promise ; }
start a browserSync server to index.html directly
start a browserSync server to index . html directly