Created
March 11, 2010 01:36
-
-
Save TomV/328703 to your computer and use it in GitHub Desktop.
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 'rubygems' | |
require 'sinatra/base' | |
require 'hoptoad_notifier' | |
API_KEY = 'YOUR Hoptoad KEY here' | |
HoptoadNotifier.configure do |config| | |
config.api_key = API_KEY | |
end | |
class MyApp < Sinatra::Base # (was Sinatra::Default) | |
use HoptoadNotifier::Rack | |
enable :raise_errors | |
get "/" do | |
"Try raising an exception: <a href='/boom'>Boom</a>" | |
end | |
get "/boom" do | |
raise "Sinatra has left the building" | |
end | |
end | |
MyApp.run! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment