This app shows how to use the Rack Routing gem.
GET /=>get_rootGET /foos/:id=>get_foo(with@url_params)POST /foos=>post_foos
Request: POST /foos, { "bar":"baz" }
Ruby:
def post_foos
Foo.create @params
Rack::Response.new( 'Foo was created.', 200 )
end
rackup
This will start the server on port 9292.
rspec
or
guard