Commit ba859afa authored by rockyl's avatar rockyl

init

parent ff223d87
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
*/ */
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const restify = require('restify'); const restify = require('restify');
const eureka_1 = require("./eureka");
const logger_1 = require("./logger"); const logger_1 = require("./logger");
const api_1 = require("./api"); const api_1 = require("./api");
let [_, __, portStr = '8090'] = process.argv; let [_, __, portStr = '8090'] = process.argv;
...@@ -34,12 +35,13 @@ process.on("SIGTERM", () => { ...@@ -34,12 +35,13 @@ process.on("SIGTERM", () => {
}, 6000); }, 6000);
}); });
server.listen(port, async function () { server.listen(port, async function () {
/*try { try {
eureka = await getEurekaClient(port); eureka = await eureka_1.getEurekaClient(port);
logger.info('eureka register success'); logger_1.default.info('eureka register success');
} catch (e) { }
logger.error(e.name); catch (e) {
}*/ logger_1.default.error(e.name);
}
logger_1.default.info('%s listening at %s', server.name, server.url); logger_1.default.info('%s listening at %s', server.name, server.url);
}); });
//# sourceMappingURL=index.js.map //# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AAEnC,qCAA8B;AAC9B,+BAA6B;AAE7B,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,GAAG,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;AAC7C,IAAI,MAAM,CAAC;AACX,IAAI,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;AAE7B,MAAM,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IACnC,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,OAAO;CAChB,CAAC,CAAC;AAEH,MAAM,eAAe,GAAG,CAAC,gBAAgB,CAAC,CAAC;AAE3C,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,O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C,EAAE,IAAI,CAAC,CAAC;AACV,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK;IACxB,IAAI;QACH,MAAM,GAAG,MAAM,wBAAe,CAAC,IAAI,CAAC,CAAC;QACrC,gBAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;KACvC;IAAC,OAAO,CAAC,EAAE;QACX,gBAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;KACrB;IACD,gBAAM,CAAC,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;AAC5D,CAAC,CAAC,CAAC"}
\ No newline at end of file \ No newline at end of file
...@@ -42,12 +42,12 @@ process.on("SIGTERM", () => { ...@@ -42,12 +42,12 @@ process.on("SIGTERM", () => {
}); });
server.listen(port, async function () { server.listen(port, async function () {
/*try { try {
eureka = await getEurekaClient(port); eureka = await getEurekaClient(port);
logger.info('eureka register success'); logger.info('eureka register success');
} catch (e) { } catch (e) {
logger.error(e.name); logger.error(e.name);
}*/ }
logger.info('%s listening at %s', server.name, server.url); logger.info('%s listening at %s', server.name, server.url);
}); });
......
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