Created
April 27, 2010 06:17
-
-
Save bradphelan/380400 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
class Foo < Sinatra::Base | |
configure do | |
EM.add_periodic_timer do | |
puts "hello" | |
end | |
end | |
<other stuff> | |
end |
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 '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