Skip to content

Instantly share code, notes, and snippets.

@lyonsinbeta lyonsinbeta/app.rb
Created Sep 30, 2014

Embed
What would you like to do?
The basics of having entirely separate Sinatra apps running on the same server.
require 'sinatra/base'
class App < Sinatra::Base
get '/' do
'app'
end
end
require 'sinatra/base'
class Bar < Sinatra::Base
get '/' do
'bar'
end
end
require './app'
require './foo'
require './bar'
map('/foo') { run Foo }
map('/bar') { run Bar }
run App
require 'sinatra/base'
class Foo < Sinatra::Base
get '/' do
'foo'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.