@unito/integration-sdk 2.3.6 → 2.3.8
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 +13 -1
- package/dist/src/integration.js +13 -1
- package/package.json +1 -1
- package/src/integration.ts +12 -1
package/dist/src/index.cjs
CHANGED
|
@@ -1195,7 +1195,19 @@ class Integration {
|
|
|
1195
1195
|
// Must be the last handler.
|
|
1196
1196
|
app.use(notFound);
|
|
1197
1197
|
// Start the server.
|
|
1198
|
-
this.instance = app.listen(this.port,
|
|
1198
|
+
this.instance = app.listen(this.port, error => {
|
|
1199
|
+
if (error) {
|
|
1200
|
+
printErrorMessage(`
|
|
1201
|
+
Error starting server:
|
|
1202
|
+
|
|
1203
|
+
> ${error.message}
|
|
1204
|
+
`);
|
|
1205
|
+
process.exit(1);
|
|
1206
|
+
}
|
|
1207
|
+
else {
|
|
1208
|
+
console.info(`Server started on port ${this.port}.`);
|
|
1209
|
+
}
|
|
1210
|
+
});
|
|
1199
1211
|
}
|
|
1200
1212
|
}
|
|
1201
1213
|
|
package/dist/src/integration.js
CHANGED
|
@@ -157,6 +157,18 @@ export default class Integration {
|
|
|
157
157
|
// Must be the last handler.
|
|
158
158
|
app.use(notFoundMiddleware);
|
|
159
159
|
// Start the server.
|
|
160
|
-
this.instance = app.listen(this.port,
|
|
160
|
+
this.instance = app.listen(this.port, error => {
|
|
161
|
+
if (error) {
|
|
162
|
+
printErrorMessage(`
|
|
163
|
+
Error starting server:
|
|
164
|
+
|
|
165
|
+
> ${error.message}
|
|
166
|
+
`);
|
|
167
|
+
process.exit(1);
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
console.info(`Server started on port ${this.port}.`);
|
|
171
|
+
}
|
|
172
|
+
});
|
|
161
173
|
}
|
|
162
174
|
}
|
package/package.json
CHANGED
package/src/integration.ts
CHANGED
|
@@ -178,6 +178,17 @@ export default class Integration {
|
|
|
178
178
|
app.use(notFoundMiddleware);
|
|
179
179
|
|
|
180
180
|
// Start the server.
|
|
181
|
-
this.instance = app.listen(this.port,
|
|
181
|
+
this.instance = app.listen(this.port, error => {
|
|
182
|
+
if (error) {
|
|
183
|
+
printErrorMessage(`
|
|
184
|
+
Error starting server:
|
|
185
|
+
|
|
186
|
+
> ${error.message}
|
|
187
|
+
`);
|
|
188
|
+
process.exit(1);
|
|
189
|
+
} else {
|
|
190
|
+
console.info(`Server started on port ${this.port}.`);
|
|
191
|
+
}
|
|
192
|
+
});
|
|
182
193
|
}
|
|
183
194
|
}
|