Created
November 30, 2012 04:12
-
-
Save freshtonic/4173737 to your computer and use it in GitHub Desktop.
This looks like it will do the job
This file contains hidden or 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
| 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