class Puma::Rack::Builder
def map(path, &block)
This example includes a piece of middleware which will run before requests hit +Heartbeat+.
end
end
run Heartbeat
use Middleware
map '/' do
Rack::Builder.app do
The +use+ method can also be used here to specify middleware to run under a specific path:
end
end
run Heartbeat
map '/' do
Rack::Builder.app do
Creates a route within the application.
def map(path, &block) @map ||= {} @map[path] = block end