Sha256: 83a33cc544486ee486a99c65b5d30d93d3f253fc3f96304ba6c6a935bc44fe4f

Contents?: true

Size: 1.88 KB

Versions: 47

Compression:

Stored size: 1.88 KB

Contents

This subsection shows example 'config.ru' files for various web frameworks.

==== Camping ====
------------------------------------------------------
require 'rubygems'
require 'rack'
require 'camping'

##### Begin Camping application
Camping.goes :Blog

...your application code here...
##### End Camping application

run Rack::Adapter::Camping.new(Blog)
------------------------------------------------------

For Camping versions 2.0 and up, using `run Blog` as the final line will do.

==== Halcyon ====
------------------------------------------------------
require 'rubygems'
require 'halcyon'
$LOAD_PATH.unshift(Halcyon.root / 'lib')
Halcyon::Runner.load_config Halcyon.root/'config'/'config.yml'
run Halcyon::Runner.new
------------------------------------------------------

==== Mack ====
------------------------------------------------------
ENV["MACK_ENV"] = ENV["RACK_ENV"]
load("Rakefile")
require 'rubygems'
require 'mack'
run Mack::Utils::Server.build_app
------------------------------------------------------

==== Merb ====
------------------------------------------------------
require 'rubygems'
require 'merb-core'

Merb::Config.setup(
  :merb_root   => ::File.expand_path(::File.dirname(__FILE__)),
  :environment => ENV['RACK_ENV']
)
Merb.environment = Merb::Config[:environment]
Merb.root = Merb::Config[:merb_root]
Merb::BootLoader.run

run Merb::Rack::Application.new
------------------------------------------------------

==== Ramaze ====
------------------------------------------------------
require "rubygems"
require "ramaze"
Ramaze.trait[:essentials].delete Ramaze::Adapter
require "start"
Ramaze.start!
run Ramaze::Adapter::Base
------------------------------------------------------

==== Sinatra ====
------------------------------------------------------
require 'rubygems'
require 'sinatra'
require 'app.rb'

run Sinatra::Application
------------------------------------------------------

Version data entries

47 entries across 47 versions & 7 rubygems

Version Path
passenger-3.0.21 doc/users_guide_snippets/rackup_specifications.txt
passenger-3.9.2.beta doc/users_guide_snippets/rackup_specifications.txt
passenger-3.0.19 doc/users_guide_snippets/rackup_specifications.txt
passenger-3.0.18 doc/users_guide_snippets/rackup_specifications.txt
passenger-3.9.1.beta doc/users_guide_snippets/rackup_specifications.txt
passenger-3.0.17 doc/users_guide_snippets/rackup_specifications.txt
passenger-3.0.15 doc/users_guide_snippets/rackup_specifications.txt
passenger-3.0.14 doc/users_guide_snippets/rackup_specifications.txt
passenger-3.0.13 doc/users_guide_snippets/rackup_specifications.txt
passenger-3.0.12 doc/users_guide_snippets/rackup_specifications.txt
yspassenger-3.0.12 doc/users_guide_snippets/rackup_specifications.txt
passenger-3.0.11 doc/users_guide_snippets/rackup_specifications.txt
passenger-3.0.10 doc/users_guide_snippets/rackup_specifications.txt
vanity-1.7.1 vendor/ruby/1.9.1/gems/passenger-2.2.15/doc/users_guide_snippets/rackup_specifications.txt
passenger-3.0.9 doc/users_guide_snippets/rackup_specifications.txt
passenger-3.0.8 doc/users_guide_snippets/rackup_specifications.txt
passenger-3.0.7 doc/users_guide_snippets/rackup_specifications.txt
passenger-3.0.6 doc/users_guide_snippets/rackup_specifications.txt
passenger-3.0.5 doc/users_guide_snippets/rackup_specifications.txt
passenger-3.0.4 doc/users_guide_snippets/rackup_specifications.txt