bmizerany (owner)

Fork Of

gist: 185512 by anonymous

Revisions

gist: 185556 Download_button fork
public
Public Clone URL: git://gist.github.com/185556.git
Embed All Files: show embed
config.ru #
1
2
3
4
5
6
7
8
9
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
 
sinatra-jruby-glassfish.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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