post '/value'do settings.hashmap[params[:key]] = params[:value] redirect '/value/params[:key]' end get '/value/:key'do erb :value, :locals => { :value => settings.hashmap[params[:key]] } end
use Rack::Session::Pool, :expire_after => 2592000 helpers do defhashmap unless session[:hashmap] session[:hashmap] = HashMap.new end session[:hashmap] end end post '/value'do hashmap[params[:key]] = params[:value] redirect '/value/params[:key]' end get '/value/:key'do erb :value, :locals => { :value => hashmap[params[:key]] } end