# All files / src/config index.js

90% Statements 9/10
50% Branches 1/2
100% Functions 0/0
90% Lines 9/10

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    152x
    2x

    2x
    2x
    2x

    2x
    2x
    2x

    2xconst defaultConfig = require("../config/defaults.json");
    const defaultsDeep = require("lodash/defaultsDeep");

    let config = {};
    try {
      config = require(`${process.env.__project_root}/pawconfig.json`);
    } catch (ex) {
      config = {};
    }
    config = defaultsDeep(config, defaultConfig);
    Eif (config.appRootUrl.endsWith("/")) {
      config.appRootUrl = config.appRootUrl.replace(/\/$/, "");
    }

    module.exports = Object.assign({}, config);