kossnocorp / ngrok-daemon

Very basic Node.js ngrok wrapper
MIT License
12 stars 1 forks source link

Ngrok not starting #1

Open kmejka opened 7 years ago

kmejka commented 7 years ago

Hi, First of all thanks for your library, its small though it should be very usefull to me! Or it would be if I managed to get it to work. I've got problems with even starting ngrok. Could you perhaps tell me what I'm doing wrong? Below is my code:

var ngrok = require('ngrok-daemon');

var port = 8000;
console.log(`Starting ngrok on ${port}`)

ngrok.start(port) 
    .then(function(tunnel) {
        console.log(`Ngrok started on ${port}`);
        console.log(`Ngrok tunnel properties: ${tunnel}`);
        ngrok.stop(tunnel.pid);
        process.exit();
    })
    .catch(function() {
        console.error(`Failed to start ngrok on ${port}`)
        process.exit();
    });

My dependency is "ngrok-daemon": "^0.5.0". The result (after the first console.log nothing happens):

$ node ngrok-agilecards-jira.js
Starting ngrok on 8000

Ngrok is not getting started:

$ ps | grep ngrok
 7121 ttys000    0:00.09 node ngrok-agilecards-jira.js
 7161 ttys002    0:00.00 grep --color=auto ngrok

My node version is 6.3.1 and my ngrok version is 2.1.3. Thanks in advance for any help!

kossnocorp commented 7 years ago

Sorry, I had to mention this. The library was developed for ngrok v1 and at the moment doesn't support v2.