summaryrefslogtreecommitdiff
path: root/config.ru
diff options
context:
space:
mode:
Diffstat (limited to 'config.ru')
-rw-r--r--config.ru16
1 files changed, 16 insertions, 0 deletions
diff --git a/config.ru b/config.ru
new file mode 100644
index 0000000..c2c7c62
--- /dev/null
+++ b/config.ru
@@ -0,0 +1,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