fix(core.gbapp): ngrok fixed and startup log improved.

This commit is contained in:
Rodrigo Rodriguez 2020-04-20 21:35:50 -03:00
parent 7a0e17d646
commit 7b878a3311
3 changed files with 7 additions and 5 deletions

View file

@ -6,10 +6,11 @@ const { exec } = require('child_process');
// Displays version of Node JS being used at runtime and others attributes.
console.log(`[GB Runtime] NodeJS = ${process.version}`);
console.log(`[GB Runtime] platform = ${process.platform}`);
console.log(`[GB Runtime] argv = ${process.argv}`);
console.log(`[GB Runtime] debugPort = ${process.debugPort}`);
console.log(`[GB Runtime] NodeJS = ${process.version}`);
console.log(`[GB Runtime] platform = ${process.platform}`);
console.log(`[GB Runtime] architecture = ${process.arch}`);
console.log(`[GB Runtime] argv = ${process.argv}`);
console.log(`[GB Runtime] debugPort = ${process.debugPort}`);
var now = () => {
return (new Date()).toISOString().replace(/T/, ' ').replace(/\..+/, '') + ' UTC';

View file

@ -261,7 +261,7 @@ STORAGE_SYNC=true
fs.existsSync('node_modules/ngrok/bin/ngrok')) {
const ngrok = require('ngrok');
return await ngrok.connectRetry({ port: port }, 10);
return await ngrok.connect({ port: port }, 10);
} else {
GBLog.warn('ngrok executable not found (only tested on Windows). Check installation or node_modules folder.');

View file

@ -127,6 +127,7 @@ export class GBServer {
GBLog.info(`Establishing a development local proxy (ngrok)...`);
GBServer.globals.publicAddress = await core.ensureProxy(port);
process.env.BOT_URL = GBServer.globals.publicAddress;
}
} else {
const serverAddress = process.env.BOT_URL;