Add DOUGAL_ROOT property to configuration object

This commit is contained in:
D. Berge
2021-10-03 21:56:25 +02:00
parent 8da664a025
commit 0533314b01

View File

@@ -92,6 +92,7 @@ if (process.env.PGDATABASE) {
delete config.db;
}
config.DOUGAL_ROOT = cfgPrefix;
config._ = (k) => k.split(".").reduce((a, b) => typeof a != "undefined" ? a[b] : a, config);
module.exports = Object.freeze(config);