sinatra-homura
Opal-oriented Sinatra compatibility patches (sinatra_opal_patches.rb) and extensions (Sinatra::JwtAuth, Sinatra::Scheduled, Sinatra::Queue) used by homura on Cloudflare Workers.
Usage
require 'sinatra/cloudflare_workers'
require 'sequel' # etc.
class App < Sinatra::Base
register Sinatra::JwtAuth
# ...
end
run App # optional if `App` is defined; a fallback registers the Rack handler at exit
Scaffolding
bundle exec homura new myapp
Generated apps should treat bundle exec rake build, bundle exec rake dev,
and bundle exec rake deploy as the primary day-to-day workflow. homura
stays available as the lower-level implementation surface behind that Rakefile.
ERB precompile
bundle exec homura erb:compile --input views --output build/templates.rb --namespace MyTemplates
See templates/Rakefile.example for Rake integration.
License
MIT. See the repository LICENSE.