Created
March 29, 2010 09:47
-
-
Save toolmantim/347662 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| require "myapp" | |
| run Sinatra::Application |
This file contains hidden or 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
| # Everything that should not / do not need to be reloaded every request (such as your requiring of third party libs) | |
| require 'sinatra' | |
| set :app_file, "myapp.rb" | |
| require 'haml' | |
| set :haml, {:format => :html5, :attr_wrapper => '"', :escape_html => true} |
This file contains hidden or 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
| require "init" | |
| get "/" do | |
| "Hello world" | |
| end |
This file contains hidden or 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
| desc "Boot up the app" | |
| task :default do | |
| exec "ruby -rrubygems myapp.rb -p 4567" | |
| end | |
| desc "Boot up the app with shotgun (uses config.ru)" | |
| task :shotgun do | |
| exec "shotgun -rinit -o 0.0.0.0 -p 4567" | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment