Sha256: 4eec103728948acb994eab3435c4888059c81c637b29aa1fa573bb0843c247ea
Contents?: true
Size: 607 Bytes
Versions: 17
Compression:
Stored size: 607 Bytes
Contents
module Bonsai class StaticPassThrough < Rack::Static def call(env) result = super return result unless result[0] == 404 || result[0] == "404" @app.call(env) end end class DevelopmentServer < Sinatra::Base set :views, "#{File.dirname(__FILE__)}/webserver" get '/' do begin Page.find("index").render rescue Exception => e @error = e erb :error end end get '/*' do begin Page.find(params[:splat].join).render rescue Exception => e @error = e erb :error end end end end
Version data entries
17 entries across 17 versions & 1 rubygems