Sha256: 98e04d63dca47c7f113190805ebfd869ee3edbafbffb4c95413994b1f62a4f7c
Contents?: true
Size: 371 Bytes
Versions: 12
Compression:
Stored size: 371 Bytes
Contents
$:.push(File.dirname(__FILE__) + "/../lib") # Just run `ruby examples/params.rb` and then use something like # `curl http://localhost:2345/api/v1/hello/John`. require "rack/api" Rack::API.app do prefix "api" version :v1 do get "/hello/:name" do {:message => "Hello, #{params[:name]}"} end end end Rack::Handler::Thin.run Rack::API, :Port => 2345
Version data entries
12 entries across 12 versions & 1 rubygems