module Rackup
Provides an environment for hosting loading a Rackup config.ru file.
Definitions
def rackup_path
The path to the rackup configuration file.
Signature
-
returns
String The absolute path to the rackup file.
Implementation
def rackup_path
File.expand_path("config.ru", root)
end
def rack_app
Parse and load the rack application from the rackup file.
Signature
-
returns
Protocol::Rack::Adapter The parsed rack application.
Implementation
def rack_app
::Protocol::Rack::Adapter.parse_file(rackup_path)
end
def middleware
Build the middleware stack for the rack application.
Signature
-
returns
Protocol::HTTP::Middleware The middleware stack.
Implementation
def middleware
::Falcon::Server.middleware(rack_app, verbose: verbose, cache: cache)
end