与数字海洋托管数据库有关本机应用程序连接问题
我正在为餐厅创建一个网络和移动应用程序。我也有租金数字海洋管理数据库来存储数据。 Web应用程序运行良好,但我无法从正在开发的React Native应用程序中发送发布请求。我们可以轻松地将我们的液滴和IP访问到数据库中,以作为受信任的来源,但是如何将其与正在开发的React Andive应用程序连接。 请帮忙。
I am creating an web and mobile app for my restaurant. I have rent digital ocean managed database as well to store data. The web app is working well but I can’t send post request from my react native app which is under development. We can easily give access our droplet and ips to database as trusted source but how can I connect it with my react native app which is under development.
Please help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用的是本地API(http:// localhost:3000/存款)
只需将其删除并使用实时API即可。
反应不支持本地主机API。 >>>
您应该使用实时API,例如( https://myapi.com/deposit ),
然后它将起作用。您可以将数据存储在数据库中
if you are using a local API (http://localhost:3000/deposit)
just remove it and use live API.
react-native not supported localhost API. >>>
you should use a live API like (https://myapi.com/deposit)
then it will work. and you could store data in your database