Skip to content
This repository has been archived by the owner on Mar 22, 2020. It is now read-only.

Feature request: directory listing #7

Closed
gaveen opened this issue Sep 30, 2015 · 2 comments
Closed

Feature request: directory listing #7

gaveen opened this issue Sep 30, 2015 · 2 comments

Comments

@gaveen
Copy link

gaveen commented Sep 30, 2015

In #2 I leaned that Serve doesn't do directory listings, it just serves individual files.

This is a suggestion that directory listing would be a much nice to have. It'll make things easier to be discovered by the person accessing than being explicitly given the URL by the runner of the command.

Unfortunately I have no idea where even to start with to implement a feature like that for this project (e.g., maybe from Iron side?). So, opening a ticket someone interested may implement it.

@aochagavia
Copy link
Owner

Iron is a very modular framework, so you shouldn't need to edit it directly. Serve uses the staticfile crate, which is a handler for Iron that serves static files but doesn't do directory listing. I see two alternatives:

  1. Extend staticfile to have a directory listing feature.
  2. Create a new Iron handler that relies on staticfile to serve files and has a fallback to directory listing when staticfile fails.

Unfortunately I don't have time to implement this right now, but I can answer any questions 😄

@aochagavia
Copy link
Owner

As stated in iron/staticfile#53 (comment), alternative 1 seems to be a valid approach.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants