gulp-webserver icon indicating copy to clipboard operation
gulp-webserver copied to clipboard

directoryListing wrong directory?

Open chrisspiegl opened this issue 9 years ago • 5 comments

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' }))

  1. If I open 127.0.0.1:8283 it shows the root directory in which the gulp file is located.
  2. If I open 127.0.0.1:8282/dist/index.html it gives me an error that the file is not found.
  3. If I open 127.0.0.1:8282/index.html it opens the index.html from the dist directory.
  4. If I open 127.0.0.1:8282/dist it shows the content of the dist 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!

chrisspiegl avatar Jul 27 '14 12:07 chrisspiegl

You're absolutely right about that. @jimthedev already seems to be working on a solution as can be seen here #5

schickling avatar Jul 27 '14 12:07 schickling

Same issue here.

MoOx avatar Nov 11 '14 07:11 MoOx

+1

jshthornton avatar Sep 17 '15 05:09 jshthornton

+1

TeodorKolev avatar Oct 18 '15 09:10 TeodorKolev

👍

jamesfe avatar Mar 19 '17 20:03 jamesfe