Created
May 9, 2012 20:05
-
-
Save gary-rafferty/2648443 to your computer and use it in GitHub Desktop.
Airbrake test
This file contains 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 'sinatra/base' | |
require 'airbrake' | |
Airbrake.configure do |config| | |
config.api_key = 'YOUR-API-KEY-HERE' | |
config.host = 'api.airbrake.io' | |
end | |
class MyApp < Sinatra::Base | |
use Airbrake::Rack | |
enable :raise_errors | |
get "/" do | |
raise "Sinatra has left the building" | |
end | |
run! if app_file == $0 | |
end | |
# To run the application | |
# ruby app.rb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment