yakuza0 2.22.1-beta.2 → 2.22.1-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yakuza0",
3
- "version": "2.22.1-beta.2",
3
+ "version": "2.22.1-beta.3",
4
4
  "description": "yakuza0 with nuxt",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -84,7 +84,7 @@ exports.default = function () {
84
84
  var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(_ref) {
85
85
  var config = _ref.config;
86
86
 
87
- var appConf, appName, server, pIp, pHost, timeout, commonHeaders, getHeader, isFastDfs, apiVer, getUc, build, baseConfig, app, _headers;
87
+ var appConf, appName, server, pIp, pHost, timeout, commonHeaders, appHc, getHeader, isFastDfs, apiVer, getUc, build, baseConfig, app, _headers;
88
88
 
89
89
  return _regenerator2.default.wrap(function _callee3$(_context3) {
90
90
  while (1) {
@@ -98,6 +98,26 @@ exports.default = function () {
98
98
  timeout = _config2.default.server.infoTimeout + 5000;
99
99
  commonHeaders = {};
100
100
 
101
+ // health-check ssl use
102
+
103
+ if (_config2.default.inImage) {
104
+ appHc = express();
105
+
106
+ appHc.use(function (req, res, next) {
107
+ var method = req.method.toUpperCase();
108
+ var path = req.url;
109
+ if (method === "GET" && path === '/sys/health-check') {
110
+ res.status(200).send({
111
+ response_status: 200,
112
+ data: 'alive'
113
+ });
114
+ } else {
115
+ res.status(404).send("The page was not found ~~");
116
+ }
117
+ });
118
+ appHc.listen(_config2.default.server.hcPort);
119
+ }
120
+
101
121
  getHeader = function getHeader(req) {
102
122
  if (req && req.headers) {
103
123
  var _ref3;
@@ -108,7 +128,7 @@ exports.default = function () {
108
128
  };
109
129
 
110
130
  if (!server.generate.enabled) {
111
- _context3.next = 26;
131
+ _context3.next = 27;
112
132
  break;
113
133
  }
114
134
 
@@ -228,14 +248,14 @@ exports.default = function () {
228
248
  }();
229
249
 
230
250
  if (_config2.default.security.isTire) {
231
- _context3.next = 16;
251
+ _context3.next = 17;
232
252
  break;
233
253
  }
234
254
 
235
- _context3.next = 16;
255
+ _context3.next = 17;
236
256
  return build();
237
257
 
238
- case 16:
258
+ case 17:
239
259
  baseConfig = {
240
260
  // changeOrigin: true,
241
261
  secure: false,
@@ -551,7 +571,7 @@ exports.default = function () {
551
571
  }, server.generate.maxAge * 1000);
552
572
  }
553
573
 
554
- case 26:
574
+ case 27:
555
575
  case "end":
556
576
  return _context3.stop();
557
577
  }
@@ -277,6 +277,7 @@ var render = function () {
277
277
  host: processEnv.HOST || '127.0.0.1',
278
278
  port: processEnv.PORT || 3000,
279
279
  appPort: processEnv.PORT || 3100,
280
+ hcPort: 81,
280
281
  orbHost: processEnv.ORBHOST || 'fe-dev.inner.px.nfjbill.ren',
281
282
  orbPort: processEnv.ORBPORT || 5601,
282
283
  orbHosts: processEnv.ORBHOSTS,