Created
April 21, 2012 14:23
-
-
Save nwest/2437344 to your computer and use it in GitHub Desktop.
Sinatra Boiler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#config.ru | |
require 'bundler/setup' | |
Bundler.require :default, :"#{ENV['RACK_ENV']}" | |
require './app.rb' | |
run Sinatra::Application | |
#app.rb | |
configure do | |
disable :run | |
set :haml, {:format => :html5} | |
enable :sessions | |
end | |
#routing, etc | |
#Gemfile | |
source :rubygems | |
gem 'sinatra' | |
gem 'haml' | |
gem 'sass' #etc | |
##Dan's way | |
#config.ru | |
require 'bundler/setup' | |
Bundler.require :default, :"#{ENV['RACK_ENV']}" | |
require './app.rb' | |
run App | |
#app.rb | |
class App < Sinatra::Application | |
configure do | |
disable :run | |
enable :sessions | |
end | |
#everything inside this class | |
end | |
#Gemfile is the same | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment