vendredi 8 novembre 2019

How can I use ngrok for backend and frontend *at the same time*?

I have a react app that I would like to test in mobile, but the mobile dev tools in either Chrome or Firefox are not enough.

Backend runs on localhost:5000 and frontend on localhost:3000.

If I run both ngrok http 3000 and ngrok http 5000 and I use the link given by ngrok http 3000 I can access my frontend but (understandly so) it can talk to my backend as it is looking for a localhost: 5000 server relative to my phone rather than looking to the link given by ngrok http 5000.

My question is:

  1. What is the best way of configuring my app and ngrok so that I can simultaneously test my app on my computer and on my phone?

  2. Is there a better way of doing this without using ngrok at all?

Thanks

Aucun commentaire:

Enregistrer un commentaire