Skip to content

bwcli serve: root / should serve index.html when it exists #70

@deftio

Description

@deftio

Description

bwcli serve . intercepts the root / route with its own shell page (bitwrench chrome with injected scripts) even when an index.html exists in the served directory.

Expected: If the served directory contains an index.html, requesting / should serve that file (like any standard static file server — nginx, Apache, npx serve, GitHub Pages, etc.).

Actual: / returns the bwcli shell page. The file is only accessible via the explicit path /index.html.

Repro

echo '<h1>Hello</h1>' > /tmp/test-dir/index.html
npx bwcli serve /tmp/test-dir -p 8080
curl http://localhost:8080/       # => bwcli shell page
curl http://localhost:8080/index.html  # => <h1>Hello</h1>

Subdirectories work correctly — /site/ serves site/index.html as expected. The issue is only with the root /.

Notes

  • --no-dir-list disables directory listings but does not change the root / behavior.
  • This is bwcli serve v2.0.31.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions