Skip to content

Instantly share code, notes, and snippets.

@bradphelan
Created April 27, 2010 06:17
Show Gist options
  • Save bradphelan/380400 to your computer and use it in GitHub Desktop.
Save bradphelan/380400 to your computer and use it in GitHub Desktop.
class Foo < Sinatra::Base
configure do
EM.add_periodic_timer do
puts "hello"
end
end
<other stuff>
end
require 'foo'
EM.run do
Thin::Logging.debug = true
puts "Starting Thin on port #{opts[:port]}"
map '/foo' do
run Foo
end
Rack::Handler::Thin.run app, :Port => 80
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment