Gulp Connect not running server

gulp, javascript, node.js

Solution

I had the same problem and I resolved it by having more than one file in the served folder (my dist directory). I don't know why it works but it started working after that.

I used the following settings:

gulp.task('connect', function(){
connect.server({
    root: ['dist'],
    port: 8000,
    base: 'http://localhost',
    livereload: true
}); 

I use v2.2.0 of gulp-connect.

Problem

I created the gulpfile.js and in it has a use for gulp-connect ``` gulp.task('connect', function(){ connect.server({ root: 'dev', livereload: true, port: 8000 }); }) ``` When I run `gulp connect` it does not maintain my server on `localhost:8000`. ``` [14:08:51] Starting 'connect'... [14:08:51] Server started http://localhost:8000 [14:08:51] LiveReload started on port 35729 [14:08:51] Finished 'connect' after 13 ms ``` Hence I get nothing when opening up `http://locahost:8000` What can I do to make connect work and create a server to deploy my html?

Original source