Closed TimChandra closed 2 years ago
As the error message says, your account can only run 2 tunnels in a single ngrok session. When you start an HTTP tunnel with ngrok, it actually starts two for you, one on HTTP and one on HTTPS. So when you run the command connect(8000)
it is actually starting two tunnels for you, so when you then try to run connect(8001)
it tries to start tunnel 3 and 4. You can start only an HTTPS tunnel by passing the option bind_tls: true
like so: connect(8000, { bind_tls: true });
. If you only want HTTP, pass false
as the option.
If you believe you have an account that can run more than 2 tunnels at a time, then you may not have your auth token set up correctly for the ngrok installation. If you think that's the case, you can set the auth token in the application by following the documentation here.
Hey @TimChandra, did my last comment help with your issue or are you still having trouble?
Please let me know so I can either help or close this issue. Thanks!
I'm going to close this, but if you are still having trouble, please feel free to reopen.
If I have two local servers running on two different ports, starting multiple tunnels using this library doesn't work:
I get the following error: