Bossan
Bossan is a high performance asynchronous ruby's rack web server.
Requirements
Bossan requires Ruby 2.1.1 or later.
Bossan supports Linux, FreeBSD and MacOSX(need gcc>=4.2).
Installation
Install from rubygems:
gem install bossan
Install from source(github):
git clone git://github.com/kubo39/bossan.git
cd bossan
rake
rake install
Usage
simple rack app:
require 'bossan'
Bossan.listen('127.0.0.1', 8000)
Bossan.run(proc {|env|
body = ['hello, world!'] # Response body
[
200, # Status code
{ # Response headers
'Content-Type' => 'text/html',
'Content-Length' => body.join.bytesize.to_s,
},
body
]
})
with rackup:
$ rackup config.ru -s bossan
Contributing
- 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