public
Description: A base Sinatra application template with DataMapper, RSpec, and Haml. Just fork and build.
Homepage:
Clone URL: git://github.com/zapnap/sinatra-template.git
sinatra-template / application.rb
100644 23 lines (18 sloc) 0.316 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require 'rubygems'
require 'sinatra'
require 'environment'
 
configure do
  set :views, "#{File.dirname(__FILE__)}/views"
end
 
error do
  e = request.env['sinatra.error']
  Kernel.puts e.backtrace.join("\n")
  'Application error'
end
 
helpers do
  # add your helpers here
end
 
# root page
get '/' do
  haml :root
end