12345678910111213141516171819202122232425262728293031 |
- // 本机、内网开发环境、外网测试环境
- let fileName = __filename;
- if (fileName.indexOf('/data/webapps/') === 0 ) {
- if (fileName.indexOf('/test.') !== -1 || fileName.indexOf('/test-') !== -1 || fileName.indexOf('_test/') !== -1) {
- module.exports = require('./config.dev.inc.js');
- } else if (fileName.indexOf('/new.') !== -1 || fileName.indexOf('/new-') !== -1 || fileName.indexOf('_new/') !== -1) {
- module.exports = require('./config.new.inc.js');
- } else {
- module.exports = require('./config.form.inc.js');
- }
- } else if (fileName.indexOf('/data_dev/') === 0 ) {
- // 内网开发环境
- module.exports = require('./config.dev.inc.js');
- } else {
- // 本地环境
- module.exports = require('./config.dev.inc.js');
- }
- module.code = require('./code.inc.js');
- //
- // var devIps =['127.0.0.1', '221.228.83.154', '183.60.177.224/27', '58.248.138.0/28', '113.108.232.32/28', '172.16.53.148/8', '61.160.36.19'];
- // var addr = getServerIp();
- // if (checkIpRange(addr, devIps)) {
- // module.exports = require('./config.dev.inc.js');
- // } else {
- // module.exports = require('./config.form.inc.js');
- // }
|