Cannot use --directory along with --index
See original GitHub issueIssue details
Running Browsersync with both --index
and --directory
cli flags makes it always serve directory listing, when navigating to a directory’s URL, even if an index file exists. I would expect it to attempt to serve the index file then and if it cannot find an index file, then serve the contents of the directory (just how Apache does it in most installations).
Steps to reproduce/test case
- Create a directory (e.g.
dir
) - Create a file called
index.html
insidedir
- Start Browsersync from the command line to serve
dir
and set both the--index
and--directory
flags. - Open the Browser
- Browsersync will serve directory listings but will not serve the
index.html
file by default, when browsing a directory’s URL
Please specify which version of Browsersync, node and npm you’re running
- Browsersync [ 2.12.8 ]
- Node [ 0.10.45 ]
- Npm [ 2.6.0 ]
Browsersync use-case
- API
- Gulp
- Grunt
- CLI
If CLI, please paste the entire command below
browser-sync start --server --port 8000 --files="**" --no-ui --index index.html --directory
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
5 Steps To Fix Windows Indexing Problems - Redmondmag.com
If you are having trouble locating data on a network drive, first make sure that the network location is being indexed. To do...
Read more >git: Unable to index file - permission denied - Stack Overflow
Try recursively chown ing and chmod ing the objects directory. ... The quickest solution is to use the sudo command to execute your...
Read more >Search indexing in Windows 10: FAQ - Microsoft Support
Indexing the contents of your PC helps you get faster results when you're searching it for files and other things. Learn how it...
Read more >index cache directory issue - Commvault Community
hello everyone , i need some help her i lose disk hold index directory for media agent ,so i create a new one...
Read more >How to Change your Default Index Page in the htaccess file
Changing your Default Index File via htaccess · Find the Files category and click on the File Manager icon. · Click Settings at...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
so the issue is that you need the directory listing middleware to be at the end of the stack, you could do
Seems quite straightforward. Thanks a lot for this.
I will try this out and provide any new comments, if applicable.
P.S.: The
--directoryFallback
option sounds great as well.