Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Multiple rack applications mounted inside each other
require 'rack'
use Rack::ContentLength
use Rack::ContentType
run proc { |env| [200, {}, '<p>First application</p><p><a href="/bar">Go to Second Application</a></p>'] }
require 'rack'
use Rack::ContentLength
use Rack::ContentType
run proc { |env| [200, {}, '<p>Second application</p><p><a href="/">Go to First Application</a></p>'] }
require 'rack'
run Rack::URLMap.new \
"/" => Rack::Builder.parse_file('app1.ru').first,
"/bar" => Rack::Builder.parse_file('app2.ru').first
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.