UNPKG

giveth-bridge

Version:

Mainnet -> sidechain Giveth Bridge.

39 lines (26 loc) 1.26 kB
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs); var _path = require('path'); var _path2 = _interopRequireDefault(_path); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } //////////////// // note: do not import this file directly. The config should be passed around within // the app. This allows the bridge to be run as a dependency in feathers-giveth // This file should only be imported in files that call bridge(config); /////////////// var _process$env = process.env, ENVIRONMENT = _process$env.ENVIRONMENT, NODE_ENV = _process$env.NODE_ENV; if (!ENVIRONMENT && NODE_ENV) ENVIRONMENT = NODE_ENV; /* istanbul ignore next */ if (!ENVIRONMENT) ENVIRONMENT = 'local'; var config = JSON.parse(_fs2.default.readFileSync(_path2.default.join(__dirname, '../config/default.json'))); if (ENVIRONMENT && _fs2.default.existsSync(_path2.default.join(__dirname, '../config/' + ENVIRONMENT + '.json'))) { var localConfig = JSON.parse(_fs2.default.readFileSync(_path2.default.join(__dirname, '../config/' + ENVIRONMENT + '.json'))); Object.assign(config, localConfig); } exports.default = config;