Sha256: b0ea9957de1deef854350f744a666f010083c01d3cc493975990e31c514645e1
Contents?: true
Size: 381 Bytes
Versions: 2
Compression:
Stored size: 381 Bytes
Contents
require_relative '../lib/grenache-ruby-http.rb' Grenache::Http.configure do |conf| conf.grape_address = "http://127.0.0.1:40002/" end EM.run do Signal.trap("INT") { EventMachine.stop } Signal.trap("TERM") { EventMachine.stop } c = Grenache::Http.new c.listen('test', 5004) do |env| req = Oj.load(env['rack.input'].read) [200,nil,"hello #{req}"] end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
grenache-ruby-http-0.1.2 | examples/worker.rb |
grenache-ruby-http-0.1.1 | examples/worker.rb |