Sha256: 80f7002f167ca99737f9595d499256f09e35059a9f7044e1e83d60b5b1520b5c

Contents?: true

Size: 812 Bytes

Versions: 2

Compression:

Stored size: 812 Bytes

Contents

Routes = Rack::Builder.new do
  use Rollbar::Middleware::Sinatra
  use Pliny::Middleware::CORS
  use Pliny::Middleware::RequestID
  use Pliny::Middleware::Instruments
  use Pliny::Middleware::RescueErrors, raise: Config.raise_errors?
  use Pliny::Middleware::RequestStore, store: Pliny::RequestStore
  use Rack::Timeout,
      service_timeout: Config.timeout if Config.timeout > 0
  use Pliny::Middleware::Versioning,
      default: Config.versioning_default,
      app_name: Config.versioning_app_name if Config.versioning?
  use Rack::Deflater
  use Rack::MethodOverride
  use Rack::SSL if Config.force_ssl?

  use Pliny::Router do
    # mount all endpoints here
    mount Endpoints::Health
    mount Endpoints::Schema
  end

  # root app; but will also handle some defaults like 404
  run Endpoints::Root
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pliny-0.16.3 lib/template/lib/routes.rb
pliny-0.16.2 lib/template/lib/routes.rb