Created
February 2, 2012 02:34
-
-
Save codespore/1721033 to your computer and use it in GitHub Desktop.
Map method rackup file
This file contains hidden or 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
| class App1 | |
| def call(env) | |
| [200, {}, ['App 1']] | |
| end | |
| end | |
| class App2 | |
| def call(env) | |
| [200, {}, ['App 2']] | |
| end | |
| end | |
| use Rack::ContentType, 'text/plain' | |
| use Rack::ContentLength | |
| map '/' do | |
| run App1.new | |
| end | |
| map '/admin' do | |
| run App2.new | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment