Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'sinatra'
- require 'redis'
- set :bind, '0.0.0.0'
- configure do
- $redis = Redis.new(:host => 'redis')
- end
- get '/' do
- count = $redis.incr('count')
- "<h1>Hello</h1>"
- "<p>This page has been viewed #{count} times</p>"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement