Sha256: 4a89751a662c2caeb6aba09bb895c6a0278bc0379ab7b901a66ba0e1b80b12f9
Contents?: true
Size: 490 Bytes
Versions: 2
Compression:
Stored size: 490 Bytes
Contents
require 'sinatra/base' require 'json' class SampleApplication < Sinatra::Base configure do disable :protection disable :sessions enable :static set :public_folder, File.expand_path('../public', __FILE__) set :view, File.expand_path('../views', __FILE__) end get '/' do erb :index end get '/notifications.json' do content_type 'application/json' (1..20).map { |id| { id: id, message: "this is notification ##{id}" } }.reverse.to_json end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
calliper-0.0.2 | test/sample/application.rb |
calliper-0.0.1 | test/sample/application.rb |