config.inc.js 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. // 本机、内网开发环境、外网测试环境
  2. let fileName = __filename;
  3. if (fileName.indexOf('/data/webapps/') === 0 ) {
  4. if (fileName.indexOf('/test.') !== -1 || fileName.indexOf('/test-') !== -1 || fileName.indexOf('_test/') !== -1) {
  5. module.exports = require('./config.dev.inc.js');
  6. } else if (fileName.indexOf('/new.') !== -1 || fileName.indexOf('/new-') !== -1 || fileName.indexOf('_new/') !== -1) {
  7. module.exports = require('./config.new.inc.js');
  8. } else {
  9. module.exports = require('./config.form.inc.js');
  10. }
  11. } else if (fileName.indexOf('/data_dev/') === 0 ) {
  12. // 内网开发环境
  13. module.exports = require('./config.dev.inc.js');
  14. } else {
  15. // 本地环境
  16. module.exports = require('./config.dev.inc.js');
  17. }
  18. module.code = require('./code.inc.js');
  19. //
  20. // 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'];
  21. // var addr = getServerIp();
  22. // if (checkIpRange(addr, devIps)) {
  23. // module.exports = require('./config.dev.inc.js');
  24. // } else {
  25. // module.exports = require('./config.form.inc.js');
  26. // }