Skip to content

Instantly share code, notes, and snippets.

@gotno
Created April 7, 2020 17:54
Show Gist options
  • Save gotno/c1ff8c4543fd4e75b8fca26bb0829ef0 to your computer and use it in GitHub Desktop.
Save gotno/c1ff8c4543fd4e75b8fca26bb0829ef0 to your computer and use it in GitHub Desktop.
basic roda
require "roda"
class Rodaaaaaapp < Roda
route do |r| # `r` is just Rack::Request + a few additional methods for routing (see below)
r.root do
"hey."
end
end
end
run Rodaaaaaapp.app
# additional methods on `r`:
# 1. r.root
# 2. r.is
# 3. r.get
# 4. r.post
# 5. r.on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment