Skip to content

Instantly share code, notes, and snippets.

@graemenelson
Created April 10, 2009 14:44
Show Gist options
  • Select an option

  • Save graemenelson/93109 to your computer and use it in GitHub Desktop.

Select an option

Save graemenelson/93109 to your computer and use it in GitHub Desktop.
require 'imanip'
require 'sequel'
# load the support libraries. loading models gets called in configure
%w( database helpers ).each { |lib| require "lib/#{lib}.rb" }
class MyApp < Sinatra::Default
configure do
set :sessions, !test?
Sequel::Model.db = Database.for_environment( environment )
load 'lib/models.rb'
end
helpers do
include Helpers # the helpers are defined in lib/helpers.rb
end
get '/' do
haml :home, {:layout => :application}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment