-
-
Save Thermatix/7552cd9f11daee6e9044 to your computer and use it in GitHub Desktop.
sinatra hack to mount via padrino mount
This file contains 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
# foo.rb | |
class Foo < ::Sinatra::Base | |
class << self | |
def dependencies; []; end | |
def setup_application!; end | |
end | |
get '/' do | |
'wubwub' | |
end | |
end | |
# config/apps.rb | |
Padrino.mount("Main::App", :app_file => File.expand_path('../app/app.rb', __FILE__).to('/') | |
Padrino.mount("Foo", :app_file => File.expand_path('../foo.rb', __FILE__).to('/foo') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment