Heeler is a shelf-compatible webserver that can be used as a drop-in replacement instead of mruby-simplehttpserver.
The server handles every request within a newly forked process. It also works well for Windows, however not in a multi-process mode.
If your app is based on Yeah!, then the heeler webserver is used by default.
The mgem provides with an integrated shelf handler:
app = Shelf::Builder.new
app.run ->(_) { [200, {}, ['<h1>Yeah!</h1>']] }
server = Shelf::Server.new server: 'heeler', app: app
server.start
Or define SHELF_HANDLER
before you start your shelf app:
$ SHELF_HANDLER=heeler shelf-app
Add the line below to your build_config.rb
:
MRuby::Build.new do |conf|
# ... (snip) ...
conf.gem 'mruby-heeler'
end
Or add this line to your aplication's mrbgem.rake
:
MRuby::Gem::Specification.new('your-mrbgem') do |spec|
# ... (snip) ...
spec.add_dependency 'mruby-heeler'
end
Clone the repo:
$ git clone https://github.com/katzer/mruby-heeler.git && cd mruby-heeler/
Compile the source:
$ rake compile
Run the tests:
$ rake test
Bug reports and pull requests are welcome on GitHub at https://github.com/katzer/mruby-heeler.
- 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
- Sebastián Katzer, Fa. appPlant GmbH
The mgem is available as open source under the terms of the MIT License.
Made with 😋 in Leipzig
© 2018 appPlant GmbH