cloudflared
Set up a public endpoint
Next, we’ll need to set up the public endpoint that serves the Activity’s frontend. To do that, we’ll create a tunnel with a reverse proxy. While we’ll be using cloudflared in this guide, you can use ngrok or another reverse proxy solution if you prefer.
While your app is still running, open another terminal window and start a network tunnel that listens to the port from the last step (in this case, port 5173):
install
mv cloudflared /usr/local/bin/cloudflared
cloudflared tunnel –url http://localhost:5173
When you run cloudflared, the tunnel will generate a public URL and you’ll see output similar to the following:
Your quick Tunnel has been created! Visit it at (it may take some time to be reachable):
https://funky-jogging-bunny.trycloudflare.com
Copy the URL from the output, as we’ll need to add it to our app’s settings.