Diode
Diode lets you quickly build a fast, simple, pure-ruby application server.
Installation
Add this line to your application's Gemfile:
gem 'diode'
And then execute:
$ bundle
Or install it yourself as:
$ gem install diode
Usage
class Hello
def serve(request)
body = JSON.dump({ "message": "Hello World!" })
Diode::Response.new(200, body)
end
end
require 'diode/server'
routing = [
[%r{^/}, "Hello"]
]
Diode::Server.new(3999, routing).start
# visit http://localhost:3999/
Documentation
Please see the wiki for more details.
Contributing
We welcome contributions to this project.
- Fork it.
- 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.