Skip to content

Instantly share code, notes, and snippets.

@morganp
Created September 8, 2010 23:46
Show Gist options
  • Save morganp/571075 to your computer and use it in GitHub Desktop.
Save morganp/571075 to your computer and use it in GitHub Desktop.
#Classy Sinatra
#Launch with ruby app.rb
require 'rubygems'
require 'sinatra/base'
#module MyModule
class MyApp < Sinatra::Base
#set :raise_errors, Proc.new { false }
#set :sessions, false
#set :static, true
#set :show_exceptions, false
#set :public, "public"
get '/' do
"Hello World!"
end
end
#end
#The missing part of the puzzle
MyApp.run!
#Classic Sinatra
#Launch with ruby app.rb
require 'rubygems'
require 'sinatra'
get '/' do
"Hello World!"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment