Skip to content

Instantly share code, notes, and snippets.

@TomV
Created March 11, 2010 01:36
Show Gist options
  • Save TomV/328703 to your computer and use it in GitHub Desktop.
Save TomV/328703 to your computer and use it in GitHub Desktop.
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