I have a problem with my gulp web server. I have a gulp task:
gulp.task('serve', ['watch'], () => {
gulp.src('tmp')
.pipe(webserver({
livereload: true,
directoryListing: true,
open: true,
//defaultFile: 'index.html'
}));
});
On startup, gulp serveI get the following screen on localhost: 8000:

It seems that the web server is serving the root directory of my project and not the tmp folder, it is strange if I click index.html, I am redirected to http://localhost:8000/index.htmlwhich is the correct file ( tmp/index.htmland not /index.html).
I use gulp-webserverfor maintenance and reboot.
What have I done wrong?
Note: uncommenting defaultFile does not help.
source
share