0

I know how to build little Sinatra apps in a service oriented way because of the books I am reading. What I am not clear about is how to host them. If each one is its own self-contained app, how to I host them together? I am coming from a Rails mindset.

RubyRedGrapefruit
  • 12,066
  • 16
  • 92
  • 193

1 Answers1

1

I would recomend to host each app it self when they not from the same project.

But if belong together you can use URLMap

# config.ru    
run Rack::URLMap.new("/" => App.new, 
                     "/api" => Api.new)

Or you can use Sinatra's middleware feature

# config.ru
...
use MyAppA
use MyAppB
use MyAppC
run MyAppD

Source: Multiple Sinatra apps using rack-mount

Community
  • 1
  • 1
Sir l33tname
  • 4,026
  • 6
  • 38
  • 49