Closed devxoul closed 6 months ago
Hi, thanks for writing in! What's happening there is it is passing in port as a string argument, but it is required to be a number. Also note that subdomain logs an error and is unused.
Something like this may work for what you are trying to do (a modification of examples/ngrok-forward-minimal.js)
const ngrok = require("@ngrok/ngrok");
const subdomain = 'localhost';
const port = 8080;
(async function () {
const listener = await ngrok.forward({ host: subdomain, port: port, authtoken_from_env: true });
console.log(`Ingress established at: ${listener.url()}`);
})();
Here are all the options available to pass in: interfaces/Config. Hopefully that is helpful!
Hello again,
This change will be in the next release, which will try to parseInt
a string port in the Config at that point as a convenience. Thanks for the feedback!
Going to close out this issue, feel free to write in if anything else comes up. Thanks again!
Hi, I'm getting error:
The code I've used:
Environments:
Please mention me if more information is needed. Thanks you guys for your great work :+1: