I tried setting up the least possible setup for gulp-connect. It shows the following in the terminal window: Server started http://localhost:8080
. However it doesn't start Chrome as expected and seen in this video.
var gulp = require('gulp'),
connect = require('gulp-connect');
var outputDir = "wwwroot";
gulp.task('connect', function() {
connect.server({
root: [outputDir],
open: {browser: 'Google Chrome'}
})});
I did some research and didn't found any options for
open
in gulp-connect. So I'm going to assume that he used an older version of the module witch supported that feature.Option 1:
To solve your problem you can use gulp-connect-multi, a forked version of gulp-connect witch includes browser opening functionality.
Option 2:
If you still want to use gulp-connect I recommend using a module called gulp-open (or even just open) that opens files and urls in the browser.
Option 3:
Search for more or create you own.
Best of Luck.