config.js 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. module.exports = {
  2. current: {server: "192.168.1.184", port: "60666",redis:{server:'192.168.1.184',port:'6379',pwd:'smartCost'}},
  3. defaultLicenseKey:'qa.smartcost.com.cn|uat.smartcost.com.cn|zbqa.smartcost.com.cn|zbuat.smartcost.com.cn|jlqa.smartcost.com.cn|jluat.smartcost.com.cn|zb.smartcost.com.cn|jl.smartcost.com.cn,834986144349993#A0quy7cvNGdyFWbz9SYxJiOiMXbEJCLig1jlzahlDZmpnInmb1uk/avoDrlmvJilrKqmXrunfbtmD0jnLiOiEmTDJCLiMTO9kDNzQDNxYDO9QzM8IiOiQWSiwSflNHbhZmOiI7ckJye0ICbuFkI1pjIEJCLi4TPRdWUxQWcvITWKFUNnlTbRhkQhl6drhkS6lTY9k4b5FUSUp7bahFRTZmZkBDWIVXa5JXO0NURQ3GRHplb0VTYYdUa8NXeTJWQCVDRxFEcZ9mVphnQBJnI0IyUiwSM5UzNwEzNxMTM0IicfJye&Qf35VfiMjY6cmI0IyQiwiIxEjL6ByUKBCZhVmcwNlI0IiTis7W0ICZyBlIsIyNzETMwEDI5AjNwgTMwIjI0ICdyNkIsIibj9SbvNmL4N7bjRnch56cuwmas86Yu46bj9Cdz36Y4JXYtNnLipHLuNmLt36YuQ7cvNGdyFWbz9CdhVHbqxibj9SbvNmL4N7bjRnch56cuEWcspGLuNmLt36YuQ7cvNGdyFWbz9CdhVnY0xibj9SbvNmL4N7bjRnch56cuEWcipHLuNmLt36YuQ7cvNGdyFWbz9CdhVHLuNm0tl2',
  4. local: {server: "localhost", port: "27017"},
  5. qa: {
  6. server: "192.168.1.90",
  7. port: "60666",
  8. options:{
  9. user:'smartcost',
  10. pass:'smartcost3850888',
  11. auth: {
  12. "authSource": "admin"
  13. },
  14. connectTimeoutMS: 100000,
  15. useMongoClient: true
  16. },
  17. importURL:"192.168.1.90:6050"
  18. },
  19. qa_outer: {
  20. server: "smartcost.in.8866.org",
  21. port: "26904",
  22. options:{
  23. user:'smartcost',
  24. pass:'smartcost3850888',
  25. auth: {
  26. "authSource": "admin"
  27. },
  28. connectTimeoutMS: 100000,
  29. useMongoClient: true
  30. },
  31. importURL:"192.168.1.184:6050"
  32. },
  33. test_auth: {
  34. server: "120.78.150.216",
  35. port: "27017",
  36. options:{
  37. user:'smartcost',
  38. pass:'smartcost3850888',
  39. auth: {
  40. "authSource": "scConstruct"
  41. },
  42. connectTimeoutMS: 20000,
  43. useMongoClient: true
  44. }
  45. },
  46. pp:{ server: "172.18.111.231",
  47. port: "27017",
  48. options:{
  49. user:'smartcost',
  50. pass:'SmartCost3850888',
  51. auth: {
  52. "authSource": "admin"
  53. },
  54. connectTimeoutMS: 50000,
  55. useMongoClient: true
  56. },
  57. importURL:"172.18.111.231:6050"
  58. },
  59. uat: {
  60. server: "112.74.42.187",
  61. port: "27017",
  62. options:{
  63. user:'smartcost',
  64. pass:'SmartCost3850888',
  65. auth: {
  66. "authSource": "admin"
  67. },
  68. connectTimeoutMS: 100000,
  69. useMongoClient: true
  70. },
  71. importURL:"192.168.1.184:6050"
  72. },
  73. prod_s:{ server: "112.74.42.187",
  74. port: "28066",
  75. options:{
  76. user:'smartcost',
  77. pass:'SmartCost3850888',
  78. auth: {
  79. "authSource": "admin"
  80. },
  81. connectTimeoutMS: 50000,
  82. useMongoClient: true
  83. }},
  84. prod:{
  85. dbURL:"mongodb://smartcost:SmartCost3850888@dds-wz9da4d5ca0fdd341.mongodb.rds.aliyuncs.com:3717,dds-wz9da4d5ca0fdd342.mongodb.rds.aliyuncs.com:3717/gaisuan?authSource=admin;replicaSet=mgset-7518601",
  86. LicenseKey:"admin.jl2.smartcost.com.cn|admin.jlqa2.smartcost.com.cn|admin.jluat2.smartcost.com.cn|civil.smartcost.com.cn|cloud.smartcost.com.cn|glm.smartcost.com.cn|gluat.smartcost.com.cn|glum.smartcost.com.cn|glyun.smartcost.com.cn|gsm.smartcost.com.cn|gsqa.smartcost.com.cn|gsqm.smartcost.com.cn|gsuat.smartcost.com.cn|gsum.smartcost.com.cn|gsyun.smartcost.com.cn|jl.smartcost.com.cn|jl2.smartcost.com.cn|jladmin.smartcost.com.cnjlqaadmin.smartcost.com.cn|jlqa.smartcost.com.cn|jlqa2.smartcost.com.cn|jluat.smartcost.com.cn|jluat2.smartcost.com.cn|jluatadmin.smartcost.com.cn|pm.smartcost.com.cn|pmqa.smartcost.com.cn|pmuat.smartcost.com.cn|qa.smartcost.com.cn|qa.std.smartcost.com.cn|qm.smartcost.com.cn|std.smartcost.com.cn|uat.smartcost.com.cn|um.smartcost.com.cn|yhm.smartcost.com.cn|yhqa.smartcost.com.cn|yhqm.smartcost.com.cn|yhuat.smartcost.com.cn|yhum.smartcost.com.cn|yhyun.smartcost.com.cn|ym.smartcost.com.cn|yun.smartcost.com.cn|zb.smartcost.com.cn|zbqa.smartcost.com.cn|zbuat.smartcost.com.cn,681116852352674#A0KbwFWYxxmauNmLt36YuQ7cvNGdyFWbz9ibp5GZhxmas86Yu46bj9Cdz36Y4JXYtNnLywmas86Yu46bj9Cdz36Y4JXYtNnLspGLuNmLt36YuQ7cvNGdyFWbz9ib5l7cnxibj9SbvNmL4N7bjRnch56cu4WdzdGLuNmLt36YuQ7cvNGdyFWbz9CdhV7cnxibj9SbvNmL4N7bjRnch56cu4WczdGLuNmLt36YuQ7cvNGdyFWbz9SYxN7Zs86Yu46bj9Cdz36Y4JXYtNnLtN7Zs86Yu46bj9Cdz36Y4JXYtNnLuVXesdGLuNmLt36YuQ7cvNGdyFWbz9Sb5x6Zs86Yu46bj9Cdz36Y4JXYtNnL4FWdsdGLuNmLt36YuQ7cvNGdyFWbz9SbsdGLuNmLt36YuQ7cvNGdyFWbz9CZ53Gbjxibj9SbvNmL4N7bjRnch56cuwWa6l6Ys86Yu46bj9Cdz36Y4JXYtNnLyQXY5xmau8WatRWYs86Y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Hbqxibj9SbvNmL4N7bjRnch56cuQXY5xmas86Yu46bj9Cdz36Y4JXYtNnLyEWcspGLuNmLt36YuQ7cvNGdyFWbz9SYxxmas86Yu46bj9Cdz36Y4JXYtNULNl",
  87. importURL:"172.18.111.228:7050",
  88. startPort:7060,
  89. importPort: 7050,
  90. socketPort:6600
  91. },
  92. redis_local:{server:'127.0.0.1',port:'6379',pwd:'smartCost'},
  93. redis_qa:{server:'192.168.1.184',port:'6379',pwd:'smartCost'},
  94. setupDb:function (env="local") {
  95. let me = this;
  96. me.current.server = me[env].server;
  97. me.current.port = me[env].port;
  98. me.current.redis=me["redis_"+env];
  99. },
  100. getSessionURL:function (env="local") {
  101. let me = this;
  102. if(me[env].dbURL){
  103. return me[env].dbURL.replace('gaisuan','gaisuanManagers');
  104. }
  105. if(me[env].options){
  106. return 'mongodb://'+ me[env].options.user +':'+ me[env].options.pass+'@'+ me[env].server+ ':'+ me[env].port + '/usersManages?authSource=admin';
  107. }else {
  108. return 'mongodb://' + me[env].server + ':' + me[env].port + '/usersManages';
  109. }
  110. },
  111. getLicenseKey:function (env = "local") {
  112. let me = this;
  113. if (me[env].LicenseKey){
  114. return me[env].LicenseKey;
  115. }else {
  116. return me.defaultLicenseKey;
  117. }
  118. },
  119. getImportURL:function (env="local",origin) {
  120. let me = this;
  121. let importURL = me[env].importURL;
  122. if(origin.indexOf("localhost")!=-1 || origin.indexOf("127.0.0.1")!=-1){
  123. importURL = "127.0.0.1:6050";
  124. }
  125. return importURL
  126. }
  127. }