Skip to content

Instantly share code, notes, and snippets.

@toolmantim
Created March 29, 2010 09:47
Show Gist options
  • Select an option

  • Save toolmantim/347662 to your computer and use it in GitHub Desktop.

Select an option

Save toolmantim/347662 to your computer and use it in GitHub Desktop.
require "myapp"
run Sinatra::Application
# 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}
require "init"
get "/" do
"Hello world"
end
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