Skip to content

Instantly share code, notes, and snippets.

@bmizerany
Forked from anonymous/gist:57983
Created February 4, 2009 08:29
Show Gist options
  • Save bmizerany/58019 to your computer and use it in GitHub Desktop.
Save bmizerany/58019 to your computer and use it in GitHub Desktop.
require File.dirname(__FILE__) + '/lib/openlinuxrouter'
require 'rubygems'
require 'sinatra'
require 'activerecord'
enable :sessions
#load modules
configure do
ActiveRecord::Base.establish_connection(:adapter => 'sqlite3',
:dbfile => 'db/openlinuxrouter.db')
Dir["./modules/*/{module, migrations}.rb"].each do |e|
load(e)
end
end
#setup errors
error do
"<em>#{request.env['sinatra.error']}</em>"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment