Skip to content

Instantly share code, notes, and snippets.

@bmizerany
Forked from anonymous/sinatra jruby glassfish
Created September 11, 2009 20:36
Show Gist options
  • Save bmizerany/185556 to your computer and use it in GitHub Desktop.
Save bmizerany/185556 to your computer and use it in GitHub Desktop.
require 'sinatra-jruby-glassfish'
# You would only say MyApp.run! is
# how you run Sinatra::Base apps
# when there is no rackup file
# Use this in a rackup file
run MyApp
require 'sinatra/base' # was 'sinatra' b4 run
require 'rack/handler/grizzly'
class MyApp < Sinatra::Base
# When you require Sinatra::Base the
# methods for configuration are only
# available on the Sinatra::Base
# eigenclass
set :app_file, __FILE__
# There is no need to set the server in Sinatra
# when using a rackup file.
#set :server, "grizzly"
get "/" do
'Hello world!'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment