Demo of Simple Ruby Web Server to View Files
Usage:
- Run with ruby,
ruby ./test/file_server.rb - Navigate to a file, e.g. http://5678:SeaSerpent.jpg
Features
- Will only serve files in
publicdirectory - Incorporates security features implemented in
Rack::Fileto ensure only authorized files are accessed. - Uses
IO.copy_stream(file, socket) - Will continue to serve files until killed.