about summary refs log tree commit diff stats
path: root/src/modules/config.js
blob: 5500323c21a6ad24259a6e54c4bcdb284c17528a (plain)
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;