Commit c98d58c7 authored by wty's avatar wty

修改页面7

parent 4268f9d0
const env = 'test'
const getConfig = ()=>{
switch (env){
case 'dev':
return require('../config/dev.json')
case 'prod':
return require('../config/prod.json')
case 'test':
return require('../config/test.json')
}
}
module.exports = getConfig
{
"PORT": "3000",
"API_HOST": "//dui123.duiba.com.cn",
"SSO": {
"ssourl": "http://sso.duiba.com.cn",
"systemId": 491,
"appSecret": "9e51dbe27cf3eb68e5686a4a433ae14b",
"systemName": "duiba-aurora-node",
"profiles": "prod"
},
"remote_config_url": "http://configserver.duiba.com/dui123/prod?accessKey=98e72000586f43e3b55da663c9f8af72"
}
{
"PORT": "3000",
"API_HOST": "//dui123.duibatest.com.cn",
"SSO": {
"ssourl": "http://sso.duibatest.com.cn",
"systemId": 491,
"appSecret": "78b6cf42fe15f8b7bbaececea9bb2a6d",
"systemName": "duiba-aurora-node",
"profiles": "test"
},
"remote_config_url": "http://configserver.dui88.com/dui123/test?accessKey=81edd6d7523e41d7bf87f303b12b3c75"
}
const MYSQL = require('mysql') const MYSQL = require('mysql')
const config = require('../config/dev.json')
const request = require('request') const request = require('request')
const config = require('../config/getConfig')()
//应用数据库 //应用数据库
const getMysql = new Promise((resolve)=>{ const getMysql = new Promise((resolve)=>{
request(config['remote_config_url'],{},(error, request, body)=>{ request(config['remote_config_url'],{},(error, request, body)=>{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment