Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (22 sloc) 705 Bytes
require 'appengine-rack'
require 'appengine-rack/java'
AppEngine::Rack.configure_app(
:application => 'application-id',
:precompilation_enabled => true,
:sessions_enabled => true,
:version => "1")
AppEngine::Rack.app.resource_files.exclude :rails_excludes
ENV['RAILS_ENV'] = AppEngine::Rack.environment
deferred_dispatcher = AppEngine::Rack::DeferredDispatcher.new(
:require => File.expand_path('../config/environment', __FILE__),
:dispatch => 'ActionController::Dispatcher')
map '/contacts' do
use AppEngine::Rack::LoginRequired
run deferred_dispatcher
end
map '/json/posts' do
run JavaServlet.new('com.ribrdb.JsonServlet')
end
map '/' do
run deferred_dispatcher
end