Configuring your App
The Configuration type
provides a way of accessing an app's configuration. You can read the full
documentation to see everything that you can configure. The two most common
fields to configure are
databaseDriver, which sets up your database
sessionEncryptionKey, which provides an AES encryption key for
encrypting session data.
You can access your application's configuration through the
Application.configuration variable. That returns a singleton
instance. You can set this information at any time, but the recommended way of
setting them is through the
configure instance method in the
type. This method is run when a
Configuration instance is created.
It is defined dynamically, so you can provide your own implementation in an
extension to the
Configuration type to do your custom configuration.