@thzero/library_server 0.15.40 → 0.15.43
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/boot/index.js +4 -3
- package/package.json +3 -3
- package/service/usageMetrics.js +2 -0
package/boot/index.js
CHANGED
|
@@ -54,8 +54,10 @@ class BootMain {
|
|
|
54
54
|
const plugins = this._determinePlugins(args);
|
|
55
55
|
await await this._initPlugins(plugins);
|
|
56
56
|
|
|
57
|
+
this.ip = this._appConfig.get('ip', null);
|
|
58
|
+
this.loggerServiceI.info2(`config.ip.override: ${this.ip}`);
|
|
57
59
|
this.port = this._appConfig.get('port');
|
|
58
|
-
this.loggerServiceI.info2(`config.port: ${this.port}`);
|
|
60
|
+
this.loggerServiceI.info2(`config.port.override: ${this.port}`);
|
|
59
61
|
this.loggerServiceI.info2(`process.env.PORT: ${process.env.PORT}`);
|
|
60
62
|
this.port = process.env.PORT || this.port;
|
|
61
63
|
this.loggerServiceI.info2(`selected.port: ${this.port}`);
|
|
@@ -108,7 +110,6 @@ class BootMain {
|
|
|
108
110
|
|
|
109
111
|
createTerminus(results.server, terminusOptions);
|
|
110
112
|
|
|
111
|
-
const address = this._appConfig.get('ip', null);
|
|
112
113
|
const self = this;
|
|
113
114
|
const listen = async (port, address) => new Promise((resolve, reject) => {
|
|
114
115
|
self._initAppListen(results.app, results.server, address, port, (err) => {
|
|
@@ -120,7 +121,7 @@ class BootMain {
|
|
|
120
121
|
resolve();
|
|
121
122
|
});
|
|
122
123
|
});
|
|
123
|
-
await listen(this.port,
|
|
124
|
+
await listen(this.port, this.ip);
|
|
124
125
|
this.address = results.server.address() ? results.server.address().address : null;
|
|
125
126
|
if (this.address === '::')
|
|
126
127
|
this.address = await internalIpV4();
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thzero/library_server",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.15.
|
|
4
|
+
"version": "0.15.43",
|
|
5
5
|
"version_major": 0,
|
|
6
6
|
"version_minor": 15,
|
|
7
|
-
"version_patch":
|
|
8
|
-
"version_date": "
|
|
7
|
+
"version_patch": 43,
|
|
8
|
+
"version_date": "05/28/2022",
|
|
9
9
|
"description": "An opinionated library of common functionality to bootstrap an API application using MongoDb and Firebase. Currently either Fastify or Koa can be used as the web server.",
|
|
10
10
|
"author": "thZero",
|
|
11
11
|
"license": "MIT",
|
package/service/usageMetrics.js
CHANGED
|
@@ -30,6 +30,8 @@ class UsageMetricsService extends Service {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
usageMetrics.date = new Date(new Date(Utilities.getTimestamp()).toISOString());
|
|
34
|
+
|
|
33
35
|
await this._repositoryUsageMetrics.register(usageMetrics);
|
|
34
36
|
return this._success(usageMetrics.correlationId);
|
|
35
37
|
}
|