Last active
December 31, 2015 01:19
-
-
Save larryzhao/7913394 to your computer and use it in GitHub Desktop.
Grape on Goliath
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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