Skip to content

Instantly share code, notes, and snippets.

@larryzhao
Last active December 31, 2015 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larryzhao/7913394 to your computer and use it in GitHub Desktop.
Save larryzhao/7913394 to your computer and use it in GitHub Desktop.
Grape on Goliath
require 'goliath'
require 'grape'
module Myapp
class API < Grape::API
version 'v1'
format :json
get '/ping' do
{ ping: "pong" }
end
end
class Server < Goliath::API
def response(env)
Myapp::API.call(env)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment