01 / 03
The routing tree
Roda's `route do |r|` block is the whole app. It composes beautifully across mounts, which makes it a great fit for multi-tenant APIs behind an ALB or Application Gateway.
ruby# app.rb require "roda" class App < Roda plugin :json plugin :halt route do |r| r.on "api/v1" do r.get "health" do { ok: true, ts: Time.now.to_i } end r.on "users", Integer do |id| r.get { User.find(id).to_h } end end end end