Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 22nd, 2012  |  syntax: None  |  size: 0.38 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. $LOAD_PATH.unshift(File.dirname(__FILE__))
  2. $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "lib"))
  3.  
  4. require 'async-rack'
  5. require 'init'
  6.  
  7. #use Rack::ApiKey
  8.  
  9. # Change this to EM.epoll on linux
  10. EM.kqueue
  11.  
  12. run proc { |env|
  13.   EventMachine.next_tick { env['async.callback'].call [200, {'Content-Type' => 'text/plain'}, "yay, async!"] }
  14.   throw :async
  15. }
  16.  
  17.  
  18. run Hoccer::App