gulp-webserver
gulp-webserver copied to clipboard
directoryListing wrong directory?
Hey, I just tested this gulp task and found that if I say directoryListing: true
, it somewhat ignores the folder I give it as a root. The weird thing is the following:
return gulp.src('dist') .pipe(webserver({ host: '127.0.0.1' port: 8282 livereload: false directoryListing: false fallback: 'dist/index.html' }))
- If I open
127.0.0.1:8283
it shows the root directory in which the gulp file is located. - If I open
127.0.0.1:8282/dist/index.html
it gives me an error that the file is not found. - If I open
127.0.0.1:8282/index.html
it opens theindex.html
from thedist
directory. - If I open
127.0.0.1:8282/dist
it shows the content of thedist
directory.
I think the directoryListing
should use the root I provide in gulp.src
as a root. Hope this is fixable.
Thanks for this great plugin!
You're absolutely right about that. @jimthedev already seems to be working on a solution as can be seen here #5
Same issue here.
+1
+1
👍