-
-
Save bmizerany/185556 to your computer and use it in GitHub Desktop.
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
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 |
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
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