[英]Connecting React Native with Meteorjs
I'm build a simple app with React Native and MeteorJs. 我正在用React Native和MeteorJs构建一个简单的应用程序。
To establish a connection between the two frameworks i'm using DDP through the 'react-native-meteor' package. 为了在两个框架之间建立连接,我通过“ react-native-meteor”包使用DDP。
My problem is that on my local machine, it's working fine with 我的问题是,在我的本地计算机上,
Meteor.connect('ws://localhost:3000/websocket');
I have hosted my backend (the meteor js app) on heroku. 我已经在heroku上托管了后端(流星js应用程序)。
Doing : 正在做:
Meteor.connect('ws://https://www.myapp.herokuapp.com/websocket');
is not working, 不管用,
How to fix that? 如何解决?
我只需要这样做
Meteor.connect('ws://myapp.herokuapp.com/websocket');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.