fix(core.gbapp): ngrok fixed and startup log improved.
This commit is contained in:
parent
7a0e17d646
commit
7b878a3311
3 changed files with 7 additions and 5 deletions
1
boot.js
1
boot.js
|
@ -8,6 +8,7 @@ const { exec } = require('child_process');
|
||||||
|
|
||||||
console.log(`[GB Runtime] NodeJS = ${process.version}`);
|
console.log(`[GB Runtime] NodeJS = ${process.version}`);
|
||||||
console.log(`[GB Runtime] platform = ${process.platform}`);
|
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] argv = ${process.argv}`);
|
||||||
console.log(`[GB Runtime] debugPort = ${process.debugPort}`);
|
console.log(`[GB Runtime] debugPort = ${process.debugPort}`);
|
||||||
|
|
||||||
|
|
|
@ -261,7 +261,7 @@ STORAGE_SYNC=true
|
||||||
fs.existsSync('node_modules/ngrok/bin/ngrok')) {
|
fs.existsSync('node_modules/ngrok/bin/ngrok')) {
|
||||||
const ngrok = require('ngrok');
|
const ngrok = require('ngrok');
|
||||||
|
|
||||||
return await ngrok.connectRetry({ port: port }, 10);
|
return await ngrok.connect({ port: port }, 10);
|
||||||
} else {
|
} else {
|
||||||
GBLog.warn('ngrok executable not found (only tested on Windows). Check installation or node_modules folder.');
|
GBLog.warn('ngrok executable not found (only tested on Windows). Check installation or node_modules folder.');
|
||||||
|
|
||||||
|
|
|
@ -127,6 +127,7 @@ export class GBServer {
|
||||||
|
|
||||||
GBLog.info(`Establishing a development local proxy (ngrok)...`);
|
GBLog.info(`Establishing a development local proxy (ngrok)...`);
|
||||||
GBServer.globals.publicAddress = await core.ensureProxy(port);
|
GBServer.globals.publicAddress = await core.ensureProxy(port);
|
||||||
|
process.env.BOT_URL = GBServer.globals.publicAddress;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const serverAddress = process.env.BOT_URL;
|
const serverAddress = process.env.BOT_URL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue