NinjaServer
This is a tiny HTTP server written in Ruby.
Features
- Serves up static files from a directory to a web browser
- Sanitizes the path requested to prevent access outside the folder
- Implicitly adds index.html to path when accessing directory roots
- NinjaServer hides the functionality of TinyServer within it
Installation
Add this line to your application's Gemfile:
gem 'ninja_server'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ninja_server
Usage
ninja_server
ninja_server port
ninja_server port staticroot
Contributing
- Fork it ( http://github.com/orangeninjamidget/ninja_server/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request