Skip to content

Instantly share code, notes, and snippets.

@Thermatix
Forked from achiurizo/apps.rb
Created October 21, 2015 16:08
Show Gist options
  • Save Thermatix/7552cd9f11daee6e9044 to your computer and use it in GitHub Desktop.
Save Thermatix/7552cd9f11daee6e9044 to your computer and use it in GitHub Desktop.
sinatra hack to mount via padrino mount
# 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