tannerburson / multi-sinatra-sample

Sample application showing how to use multiple sinatra subclass applications in a single process.
44 stars 4 forks source link

Multi Class Sinatra Sample Application

This is a simple application showing how you can mount multiple Sinatra applications into a single process. It utilizes the builtin Rack middleware, URLMap. I use a simple RackUp file to launch the server, though you can probably do this in a single file.

thin -R config.ru start

or

rake start

I've extended this example to show how with a shared base class between 'apps' you can easily share configuration options.

This sample now includes a sample set of RSpec tests using Sinatra's new recommended test method, Rack::Test. I've also fixed a few issues bringing it up to compatibility with Sinatra 0.9.3