Skip to content

Commit

Permalink
fix(core): ngrok is running on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
SarahLourenco committed Apr 30, 2019
1 parent 528e0a9 commit 000bdc1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/core.gbapp/services/GBCoreService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,15 @@ STORAGE_SYNC=true

public async ensureProxy(port): Promise<string> {
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');

return await ngrok.connect({ port: port });
} else {
GBLog.warn('ngrok executable not found (only tested on Windows). Check installation or node_modules folder.');

return 'localhost';
return 'https://localhost';
}
} catch (error) {
// There are false positive from ngrok regarding to no memory, but it's just
Expand Down

0 comments on commit 000bdc1

Please sign in to comment.