1

I have followed this great blog post: How to call a locally hosted server from Expo?

However I get stuck at the next step:

The above command will return a URL accessible across Internet of the form https://application-mock-server.localtunnel.me. This URL can be plugged inside the React Native code base and will be accessible from the application running inside Expo on the mobile.

I have tried to figure out how to "plug the localtunnel URL inside the React Native code base". I thought that it would be "homepage" in "package.json", but so far no luck. Can you please help?

ItFlyingStart
  • 261
  • 4
  • 13

2 Answers2

2

Never mind. I haven't noticed this "tunnel" option until now, which does the trick.

enter image description here

ItFlyingStart
  • 261
  • 4
  • 13
0

You need to specify that URL where you are sending API request. If you have not created a separate file, you can create apiConfig.js file or any similar named file and export that URL from the file and reference where ever you need to call the backend API.

Dharman
  • 30,962
  • 25
  • 85
  • 135