fix(core): ngrok is running on linux
This commit is contained in:
parent
528e0a90eb
commit
000bdc1eec
1 changed files with 3 additions and 2 deletions
|
@ -242,14 +242,15 @@ STORAGE_SYNC=true
|
||||||
|
|
||||||
public async ensureProxy(port): Promise<string> {
|
public async ensureProxy(port): Promise<string> {
|
||||||
try {
|
try {
|
||||||
if (fs.existsSync('node_modules/ngrok/bin/ngrok.exe')) {
|
if (fs.existsSync('node_modules/ngrok/bin/ngrok.exe') ||
|
||||||
|
fs.existsSync('node_modules/ngrok/bin/ngrok')) {
|
||||||
const ngrok = require('ngrok');
|
const ngrok = require('ngrok');
|
||||||
|
|
||||||
return await ngrok.connect({ port: port });
|
return await ngrok.connect({ port: port });
|
||||||
} 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.');
|
||||||
|
|
||||||
return 'localhost';
|
return 'https://localhost';
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// There are false positive from ngrok regarding to no memory, but it's just
|
// There are false positive from ngrok regarding to no memory, but it's just
|
||||||
|
|
Loading…
Add table
Reference in a new issue