Skip to content

Commit

Permalink
fix(core.gbapp): ngrok fixed and startup log improved.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Apr 21, 2020
1 parent 7a0e17d commit 7b878a3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion packages/core.gbapp/services/GBCoreService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.');

Expand Down
1 change: 1 addition & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7b878a3

Please sign in to comment.