Skip to content

Instantly share code, notes, and snippets.

@freshtonic
Created November 30, 2012 04:12
Show Gist options
  • Select an option

  • Save freshtonic/4173737 to your computer and use it in GitHub Desktop.

Select an option

Save freshtonic/4173737 to your computer and use it in GitHub Desktop.
This looks like it will do the job
require File.dirname(__FILE__) + '/config/boot'
require './blaze_control_panel'
application = Rack::Builder do
use Rack::SslEnforcer if ENV['RACK_ENV'] == 'production'
use Rack::CommonLogger, File.new('log/access.log', 'a+')
use GoogleOpenIdAuth
run Rack::Cascade.new [::API::V1::Blaze, BlazeControlPanel]
end
# Responds to the AWS load balancer's ping.
class Pong
def self.call(env)
[200, {"Content-Type" => "text/html"}, "Pong!"]
end
end
run Rack::URLMap.new({
'/ping' => Pong,
'/' => application
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment