简体   繁体   中英

React native axios call to node js backend

We're developing a react native app with a node.js server running express on the backend.

We're making the call from the UI to node.js using axios.get('http://ipv4address:3001/apicall') .

We've installed the expo-cli and are trying to run the app from Expo Go on our phones. The LAN version works fine for the developer who has started the server and the UI, but when he changes it to Tunnel mode to share the link, we get a Promise Reject error when the axios call is made from our phones on Expo Go.

How do you share the app with other people who are not on the same LAN?

How do you share the app with other people who are not on the same LAN?

You can try expo-snack

Also you can import code there from git repository too.

Click on three dots beside create folder icon to open this menu单击创建文件夹图标旁边的三个点以打开此菜单

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM