Skip to content

Instantly share code, notes, and snippets.

@iamwilhelm
Created August 2, 2010 01:11
Show Gist options
  • Save iamwilhelm/503973 to your computer and use it in GitHub Desktop.
Save iamwilhelm/503973 to your computer and use it in GitHub Desktop.
require "config/environment"
# HTTP Auth For Resque Console
AUTH_PASSWORD = "password" || ENV['AUTH']
if AUTH_PASSWORD
Resque::Server.use Rack::Auth::Basic do |username, password|
password == AUTH_PASSWORD
end
end
use Rails::Rack::Static
run Rack::URLMap.new(
"/" => ActionController::Dispatcher.new,
"/resque" => Resque::Server.new
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment