@thzero/library_server 0.15.38 → 0.15.41

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.
Files changed (2) hide show
  1. package/boot/index.js +6 -4
  2. package/package.json +4 -5
package/boot/index.js CHANGED
@@ -54,6 +54,8 @@ 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.port: ${this.ip}`);
57
59
  this.port = this._appConfig.get('port');
58
60
  this.loggerServiceI.info2(`config.port: ${this.port}`);
59
61
  this.loggerServiceI.info2(`process.env.PORT: ${process.env.PORT}`);
@@ -109,8 +111,8 @@ class BootMain {
109
111
  createTerminus(results.server, terminusOptions);
110
112
 
111
113
  const self = this;
112
- const listen = async (port) => new Promise((resolve, reject) => {
113
- self._initAppListen(results.app, results.server, port, (err) => {
114
+ const listen = async (port, address) => new Promise((resolve, reject) => {
115
+ self._initAppListen(results.app, results.server, address, port, (err) => {
114
116
  if (err) {
115
117
  reject(err);
116
118
  return;
@@ -119,7 +121,7 @@ class BootMain {
119
121
  resolve();
120
122
  });
121
123
  });
122
- await listen(this.port);
124
+ await listen(this.port, this.ip);
123
125
  this.address = results.server.address() ? results.server.address().address : null;
124
126
  if (this.address === '::')
125
127
  this.address = await internalIpV4();
@@ -142,7 +144,7 @@ class BootMain {
142
144
  throw new NotImplementedError();
143
145
  }
144
146
 
145
- _initAppListen(app, server, port, err) {
147
+ _initAppListen(app, server, address, port, err) {
146
148
  throw new NotImplementedError();
147
149
  }
148
150
 
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@thzero/library_server",
3
3
  "type": "module",
4
- "version": "0.15.38",
4
+ "version": "0.15.41",
5
5
  "version_major": 0,
6
6
  "version_minor": 15,
7
- "version_patch": 38,
8
- "version_date": "04/19/2022",
7
+ "version_patch": 41,
8
+ "version_date": "04/25/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",
@@ -21,8 +21,7 @@
21
21
  "node": ">=12.8.3"
22
22
  },
23
23
  "scripts": {
24
- "cli-update": "./node_modules/.bin/library-cli --updateversion --pi",
25
- "cli-update-w": ".\\node_modules\\.bin\\library-cli --updateversion --pi",
24
+ "cli-update": "library-cli --updateversion --pi",
26
25
  "test": "echo \"Error: no test specified\" && exit 1"
27
26
  },
28
27
  "dependencies": {