Get a tree of config imported from the config directory
Check if config value exists for a given key
config.has('database.mysql')
Read value from the config. Make use of the dot notation
syntax to read nested values.
The defaultValue is returned when the original value
is undefined.
config.get('database.mysql')
OptionaldefaultValue: anyDefine defaults for a config key. The defaults are merged with the value of the config key.
Update value for a key. No changes are made on the disk
config.set('database.host', '127.0.0.1')
Config module eases the process of using configuration inside your AdonisJS applications.
The config files are stored inside a dedicated directory, which are loaded and cached on application boot. Later you can access the values using the
dotsyntax.Access values
config/app.tswith following content