Sha256: cfcac3ee2ac8ac85f743f5c33b8ef0eb2797004a10a668ce90b1b40acfc200c5
Contents?: true
Size: 419 Bytes
Versions: 2
Compression:
Stored size: 419 Bytes
Contents
require 'thin' require 'grenache-ruby-base' require_relative "../lib/grenache/base.rb" Grenache::Base.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::Base.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.0.3 | examples/worker.rb |
grenache-ruby-http-0.0.1 | examples/worker.rb |