Sha256: 586769d1e610617475ea193d980db6adff561c86c6f531394ba06cd5f79b873c

Contents?: true

Size: 700 Bytes

Versions: 3

Compression:

Stored size: 700 Bytes

Contents

require "dry/web/roda/application"
require_relative "container"

module <%= config[:camel_cased_app_name] %>
  class Application < Dry::Web::Roda::Application
    configure do |config|
      config.container = Container
      config.routes = "web/routes".freeze
    end

    opts[:root] = Pathname(__FILE__).join("../..").realpath.dirname

    use Rack::Session::Cookie, key: "<%= config[:underscored_app_name] %>.session", secret: <%= config[:camel_cased_app_name] %>::Container.settings.session_secret

    plugin :csrf, raise: true
    plugin :flash
    plugin :dry_view

    route do |r|
      r.multi_route

      r.root do
        r.view "welcome"
      end
    end

    load_routes!
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dry-web-roda-0.6.3 lib/dry/web/roda/skeletons/flat_project/system/__underscored_app_name__/application.rb.tt
dry-web-roda-0.6.2 lib/dry/web/roda/skeletons/flat_project/system/__underscored_app_name__/application.rb.tt
dry-web-roda-0.6.1 lib/dry/web/roda/skeletons/flat_project/system/__underscored_app_name__/application.rb.tt