aboutsummaryrefslogtreecommitdiffstats
path: root/app.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app.rb')
-rwxr-xr-xapp.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/app.rb b/app.rb
new file mode 100755
index 0000000..0b9e4e2
--- /dev/null
+++ b/app.rb
@@ -0,0 +1,27 @@
+#! /usr/bin/env ruby -w
+
+require "redis"
+require "sinatra"
+
+redis = Redis.new
+redis.set("mykey", "lalala")
+
+get '/' do
+ erb :index
+end
+
+get '/add' do
+ erb :form
+end
+
+post '/add' do
+ redis.set('blaa', params[:name])
+end
+
+get '/:cat' do | cat |
+ # /machines
+end
+
+get '/:cat/:instance' do | cat, inst |
+ # /machines/fileserver
+end