spencercarli / react-native-meteor-boilerplate

MIT License
628 stars 139 forks source link

Connecting to production server #42

Closed elie222 closed 8 years ago

elie222 commented 8 years ago

How would you connect an app to a production server?

I changed this line: let METEOR_URL = 'ws://localhost:3000/websocket'; to: let METEOR_URL = 'ws://example.com/websocket'; But it didn't work for me.

Feel like I'm missing something small here.

spencercarli commented 8 years ago

If you want to connect to the production server you will want to change this line to something like let METEOR_URL = 'ws://example.com/websocket';

However, if the app has been build for deployment for the app stores you want to change this line to something like let METEOR_URL = 'ws://example.com/websocket';

elie222 commented 8 years ago

I finally solved the problem, by writing: let METEOR_URL = 'wss://example.com/websocket';

I had to use wss.