Skip to content

Instantly share code, notes, and snippets.

@havenwood
Created January 8, 2026 19:58
Show Gist options
  • Select an option

  • Save havenwood/54fd3243905d4a5f3a7349eb27ad512b to your computer and use it in GitHub Desktop.

Select an option

Save havenwood/54fd3243905d4a5f3a7349eb27ad512b to your computer and use it in GitHub Desktop.
Example showing running Falcon locally from a single file (IRC question about ditching config.ru)
#!/usr/bin/env -S falcon-host
# frozen_string_literal: true
require "falcon/environment/rack"
require "roda"
class App < Roda
route do |r|
r.root { "wombat" }
end
end
service "wombat-app" do
include Falcon::Environment::Rack
middleware do
Falcon::Server.middleware(App.freeze.app, verbose:, cache:)
end
endpoint do
Async::HTTP::Endpoint.parse("http://localhost:9292")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment