18 lines
511 B
JavaScript
18 lines
511 B
JavaScript
|
var path = require('path');
|
||
|
var fs = require('fs');
|
||
|
var config = {};
|
||
|
|
||
|
let devConfigPath = path.join(__dirname, '/config/datasources.development.json');
|
||
|
let configPath = path.join(__dirname, '/config/datasources.json');
|
||
|
|
||
|
try {
|
||
|
config = Object.assign(require(configPath), require(devConfigPath));
|
||
|
} catch (e) {
|
||
|
if (e.code == 'MODULE_NOT_FOUND')
|
||
|
return require(configPath);
|
||
|
}
|
||
|
|
||
|
config.proxy = require('../../nginx/config.json');
|
||
|
config.package = require('../package.json');
|
||
|
|
||
|
module.exports = config;
|