@unito/integration-sdk 2.2.0 → 2.2.1
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/dist/src/index.cjs +1 -1
- package/dist/src/integration.js +1 -1
- package/package.json +1 -1
- package/src/integration.ts +1 -1
package/dist/src/index.cjs
CHANGED
|
@@ -1006,7 +1006,7 @@ class Integration {
|
|
|
1006
1006
|
* @param options The {@link Options} to configure the Integration instance. Can be used to override the default port.
|
|
1007
1007
|
*/
|
|
1008
1008
|
constructor(options = {}) {
|
|
1009
|
-
this.port = options.port || 9200;
|
|
1009
|
+
this.port = options.port || (process.env.PORT ? parseInt(process.env.PORT, 10) : 9200);
|
|
1010
1010
|
this.handlers = [];
|
|
1011
1011
|
}
|
|
1012
1012
|
/**
|
package/dist/src/integration.js
CHANGED
|
@@ -42,7 +42,7 @@ export default class Integration {
|
|
|
42
42
|
* @param options The {@link Options} to configure the Integration instance. Can be used to override the default port.
|
|
43
43
|
*/
|
|
44
44
|
constructor(options = {}) {
|
|
45
|
-
this.port = options.port || 9200;
|
|
45
|
+
this.port = options.port || (process.env.PORT ? parseInt(process.env.PORT, 10) : 9200);
|
|
46
46
|
this.handlers = [];
|
|
47
47
|
}
|
|
48
48
|
/**
|
package/package.json
CHANGED
package/src/integration.ts
CHANGED
|
@@ -53,7 +53,7 @@ export default class Integration {
|
|
|
53
53
|
* @param options The {@link Options} to configure the Integration instance. Can be used to override the default port.
|
|
54
54
|
*/
|
|
55
55
|
constructor(options: Options = {}) {
|
|
56
|
-
this.port = options.port || 9200;
|
|
56
|
+
this.port = options.port || (process.env.PORT ? parseInt(process.env.PORT, 10) : 9200);
|
|
57
57
|
this.handlers = [];
|
|
58
58
|
}
|
|
59
59
|
|