class Sinatra::Base

def build(app)

the given +app+ as end point.
Creates a Rack::Builder instance with all the middleware set up and
def build(app)
  builder = Rack::Builder.new
  setup_default_middleware builder
  setup_middleware builder
  builder.run app
  builder
end