Skip to content

jfairbairn/david

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

David - defeating Goliath for your Rack apps

So Goliath is "mostly Rack-compatible" but "not Rack-compliant". I'm just fooling with some stuff to see how far we can go towards running arbitrary Rack apps side-by-side with Goliath::API subclasses.

Currently we can run a Sinatra app in Goliath, via rackup.

require 'david/rack'
require 'goliath'

class MyApp < Sinatra::Base
  # your app here :)
end

# you need to instantiate this before you subclass Goliath::API for the last time.
rack_app = David::RackAdaptor.build(:once => true) { MyApp.new }

class MyGoliathApp < Goliath::API
  map '/rack_app', rack_app
end

Onwards!

About

Defeating Goliath for your Rack apps

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages