Cloudflare Argo Tunnel from Node child_process
I have an electron app from which I would like to spawn a child process that executes
cloudflared tunnel --url localhost:3000
inside a certain directory. Executing this from cmd inside that directory instantiates the argo tunnel as expected, and the url works while the process is running. This is how I am executing the command from the electron app:
const { spawn } = require('child_process')
let tunnel = spawn('cloudflared', ['tunnel', '--url', 'localhost:4000'], {
stdio: 'inherit', // Will use process .stdout, .stdin, .stderr
cwd: 'c://cloudflare'
})
I can see the normal console output from cloudflare indicating that the tunnel has been established and my server is responding at some-random-name.trycloudflare.com. However, when the process is started from within the electron app, I get Error 1016 displayed on a cloudflare error page.
Does anyone have experience with Argo Tunnel and child_process?
from Error 1016 when executing Argo Tunnel from Node child_process
No comments:
Post a Comment