Authored by 徐祁xuqi

pc zookeeper init

@@ -34,6 +34,11 @@ global.utils = path.resolve('./utils'); @@ -34,6 +34,11 @@ global.utils = path.resolve('./utils');
34 app.locals.devEnv = app.get('env') === 'development'; 34 app.locals.devEnv = app.get('env') === 'development';
35 app.locals.version = pkg.version; 35 app.locals.version = pkg.version;
36 36
  37 +// zookeeper
  38 +if (config.zookeeperServer) {
  39 + require('yoho-zookeeper')(config.zookeeperServer, 'pc', app.locals.pc = {});
  40 +}
  41 +
37 app.set('subdomain offset', 2); 42 app.set('subdomain offset', 2);
38 app.set('view engine', '.hbs'); 43 app.set('view engine', '.hbs');
39 app.set('views', './doraemon/views'); 44 app.set('views', './doraemon/views');
@@ -72,7 +72,8 @@ module.exports = { @@ -72,7 +72,8 @@ module.exports = {
72 appID: 'wx3ae21dcbb82ad672', 72 appID: 'wx3ae21dcbb82ad672',
73 appSecret: 'e78afb2321e6a19085767e1a0f0d52c1' 73 appSecret: 'e78afb2321e6a19085767e1a0f0d52c1'
74 } 74 }
75 - } 75 + },
  76 + zookeeperServer: '192.168.102.168:2188'
76 }; 77 };
77 78
78 if (isProduction) { 79 if (isProduction) {
@@ -98,7 +99,8 @@ if (isProduction) { @@ -98,7 +99,8 @@ if (isProduction) {
98 interfaceShunt: { 99 interfaceShunt: {
99 open: false, 100 open: false,
100 url: 'http://123.206.2.55/strategy' 101 url: 'http://123.206.2.55/strategy'
101 - } 102 + },
  103 + zookeeperServer: '10.66.1.97:2181'
102 }); 104 });
103 } else if (isTest) { 105 } else if (isTest) {
104 Object.assign(module.exports, { 106 Object.assign(module.exports, {
@@ -37,9 +37,9 @@ @@ -37,9 +37,9 @@
37 "connect-memcached": "^0.2.0", 37 "connect-memcached": "^0.2.0",
38 "cookie-parser": "^1.4.3", 38 "cookie-parser": "^1.4.3",
39 "express": "^4.13.1", 39 "express": "^4.13.1",
40 - "handlebars": "^4.0.5",  
41 "express-handlebars": "^3.0.0", 40 "express-handlebars": "^3.0.0",
42 "express-session": "^1.13.0", 41 "express-session": "^1.13.0",
  42 + "handlebars": "^4.0.5",
43 "influxdb-winston": "^1.0.1", 43 "influxdb-winston": "^1.0.1",
44 "lodash": "^4.13.1", 44 "lodash": "^4.13.1",
45 "md5": "^2.1.0", 45 "md5": "^2.1.0",
@@ -62,7 +62,8 @@ @@ -62,7 +62,8 @@
62 "winston": "^2.2.0", 62 "winston": "^2.2.0",
63 "winston-daily-rotate-file": "^1.1.4", 63 "winston-daily-rotate-file": "^1.1.4",
64 "yoho-express-session": "^1.14.1", 64 "yoho-express-session": "^1.14.1",
65 - "yoho-node-lib": "0.1.19" 65 + "yoho-node-lib": "0.1.19",
  66 + "yoho-zookeeper": "^1.0.3"
66 }, 67 },
67 "devDependencies": { 68 "devDependencies": {
68 "autoprefixer": "^6.3.6", 69 "autoprefixer": "^6.3.6",