src/modules/config.js (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | "use strict";
const path = require("path");
const TOML = require("toml");
const config = require("configly");
function getConfig(configFile = "./config") {
return config(["./config", path.resolve(__dirname, "../../config/")], {
parsers: {
toml: TOML.parse
}
});
}
module.exports = getConfig;
|