# This is the main configuration file of your Dancer2 app # env-related settings should go to environments/$env.yml # all the settings in this file will be loaded at Dancer's startup. # === Basic configuration === # Your application's name appname: "DocsLib" # The default layout to use for your application (located in # views/layouts/main.tt) # layout: "main" # not using this, now single-page application # when the charset is set to UTF-8 Dancer2 will handle for you # all the magic of encoding and decoding. You should not care # about unicode within your app when this setting is set (recommended). charset: UTF-8 dbname: db/data.db documents_path: ~ # defined in config_local.yml & environment settings max_records_per_page: 25 # number of records to show per page in listings # for 'on_connect_do' (D2 plugin), or $dbix (DBIx::Simple) ADJUST function db_init: db/init_db.sql session: Cookie # === Engines === # # NOTE: All the engine configurations need to be under a single "engines:" # key. If you uncomment engine configurations below, make sure to delete # all "engines:" lines except the first. Otherwise, only the last # "engines:" block will take effect. # template engine # simple: default and very basic template engine # template_toolkit: TT # template: "simple" template: template_toolkit engines: template: template_toolkit: # WRAPPER: layouts/main.tt # disabled to allow layout to be defined in routes # DEBUG: 'plugins' PLUGIN_BASE: 'App::TT' # custom plugin with useful macros include_path: views/content start_tag: '[%' end_tag: '%]' # session engine # # Simple: in-memory session store - Dancer2::Session::Simple # YAML: session stored in YAML files - Dancer2::Session::YAML # # Check out metacpan for other session storage options: # https://metacpan.org/search?q=Dancer2%3A%3ASession&search_type=modules # # Default value for 'cookie_name' is 'dancer.session'. If you run multiple # Dancer apps on the same host then you will need to make sure 'cookie_name' # is different for each app. # session: # Simple: # in-memory # cookie_name: docslib.session # YAML: # cookie_name: eshop.session # is_secure: 1 # is_http_only: 1 Cookie: secret_key: 8c285c2b2f9ce11c46ee322d52179ac32be6d42a cookie_duration: 3600 with_request_address: 0 plugins: Database: driver: SQLite database: db/data.db # run a query when connecting to the database: # on_connect_do: "[ ... ]" # too long, function moved to Routes CryptPassphrase: encoder: # argon2 is the most secure, but also slowest module: Argon2 # Bcrypt # cost: 14 # for Bcrypt # hash: sha256 # for Bcrypt parallelism: 2 #validators: # - Bcrypt