NinjaServer
This is a tiny HTTP server written in Ruby.
Features that Ninjas provide
- Serves up static files from a directory to a web browser
- Slices off bad .. in the path requested to prevent access outside the folder
- Reads your mind by implicitly adds index.html to path when accessing directory roots
- Hides the functionality of TinyServer within it
- Intelligently points to /public if it exists, otherwise it uses the folder called server
- Silently kills the server with CTRL+c
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 will use default 1337 port, try to use public folder or this folder
ninja_server port will try to use public folder or this folder
ninja_server port staticroot will serve up to your desires
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