Sha256: 58587e21e572a46072016693b09cfa37dab22b1e7b1d32fc053b4ff82a1c0d5d
Contents?: true
Size: 446 Bytes
Versions: 11
Compression:
Stored size: 446 Bytes
Contents
$:.push(File.dirname(__FILE__) + "/../lib") # Just run `ruby examples/formats.rb` and then use something like # `curl http://localhost:2345/api/v1/hello.json` or # `curl http://localhost:2345/api/v1/hello.jsonp?callback=myJSHandler`. require "rack/api" Rack::API.app do prefix "api" version :v1 do get "/hello(.:format)" do {:message => "Hello from Rack API"} end end end Rack::Handler::Thin.run Rack::API, :Port => 2345
Version data entries
11 entries across 11 versions & 1 rubygems