Sha256: 400a9ff8c1ec651cdf00a0d9781d6602adc32d366544e8726f8e56c5fc4a5fb5
Contents?: true
Size: 418 Bytes
Versions: 4
Compression:
Stored size: 418 Bytes
Contents
$:.push(File.dirname(__FILE__) + "/../lib") # Just run `ruby examples/controller.rb` and then use something like # `curl http://localhost:2345/api/v1/`. require "rack/api" class Hello < Rack::API::Controller def index {:message => "Hello, awesome API!"} end end Rack::API.app do prefix "api" version :v1 do get "/", :to => "hello#index" end end Rack::Handler::Thin.run Rack::API, :Port => 2345
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rack-api-1.1.0 | examples/controller.rb |
rack-api-1.0.2 | examples/controller.rb |
rack-api-1.0.1 | examples/controller.rb |
rack-api-1.0.0 | examples/controller.rb |