diff options
Diffstat (limited to 'app.rb')
-rwxr-xr-x | app.rb | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -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 |