mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
8c3a543664
# app/metal/poller.rb class Poller < Rails::Rack::Metal def call(env) if env["PATH_INFO"] =~ /^\/poller/ [200, {"Content-Type" => "application/json"}, Message.recent.to_json] else super end end end * There is a generator to help you get started `script/generate metal poller` * Also, metal bits can be ran standalone with rackup `rackup app/metal/poller.rb` |
||
---|---|---|
.. | ||
debugger.rb | ||
logger.rb | ||
metal.rb | ||
static.rb |