Click here to view this project.
This is a tiny Sinatra app that dynamically lists the files inside a public/ directory and renders them as links. It also supports a simple sort toggle via a query parameter (ascending vs descending), which is a nice, clean example of using request params to change server-side behavior.
Skills demonstrated:
- Ruby
- Sinatra
- ERB templating
- HTTP query params (sorting with
?sort=desc) - Filesystem exploration (
Dir.glob,File.basename) - Basic HTML output
Leave a Reply