@tiledesk/tiledesk-tybot-connector 0.1.1 → 0.1.2
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/CHANGELOG.md +2 -0
- package/index.js +16 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/index.js
CHANGED
|
@@ -348,9 +348,22 @@ function startApp(settings, completionCallback) {
|
|
|
348
348
|
if (!settings.log) {
|
|
349
349
|
log = false;
|
|
350
350
|
}
|
|
351
|
+
/*
|
|
352
|
+
if (!process.env.MONGODB_URI) {
|
|
353
|
+
throw new Error("process.env.MONGODB_URI is mandatory.");
|
|
354
|
+
}
|
|
355
|
+
if (!process.env.API_ENDPOINT) {
|
|
356
|
+
throw new Error("settings.API_ENDPOINT is mandatory.");
|
|
357
|
+
}
|
|
358
|
+
if (!process.env.TILEBOT_LOG) {
|
|
359
|
+
log = false;
|
|
360
|
+
}
|
|
361
|
+
else {
|
|
362
|
+
log = true;
|
|
363
|
+
}*/
|
|
351
364
|
|
|
352
|
-
console.log("Starting
|
|
353
|
-
console.log("(
|
|
365
|
+
console.log("Starting Tilebot connector...");
|
|
366
|
+
console.log("(Tilebot) Connecting to mongodb...");
|
|
354
367
|
|
|
355
368
|
connection = mongoose.connect(process.env.mongoUrl, { "useNewUrlParser": true, "autoIndex": false }, function(err) {
|
|
356
369
|
if (err) {
|
|
@@ -358,7 +371,7 @@ function startApp(settings, completionCallback) {
|
|
|
358
371
|
//process.exit(1); // add => exitOnFail: true
|
|
359
372
|
}
|
|
360
373
|
else {
|
|
361
|
-
console.info("
|
|
374
|
+
console.info("Tilebot start.");
|
|
362
375
|
if (completionCallback) {
|
|
363
376
|
completionCallback();
|
|
364
377
|
}
|