blob: c2c7c62fa4f51eadfe9b2631c27de340c98dff5e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
require File.expand_path('../lib/zero.rb', __FILE__)
require 'json'
class Foo
def call(env)
req = Rack::Request.new(env)
[200, {'Content-Type' => 'text/html'}, ["this works #{req.params.inspect}"]]
end
end
routes = Zero::Router.new(
'/foo/:id' => Foo.new,
'/' => Foo.new
)
run routes
|