I have an existing hybrid mobile app written with Ionic. It uses a server I’ve written with Node and Mongoose that expose REST api.
I want to integrate an in-app chat service, and I decided to use the “whatsapp clone tutorial” with Meteor.
I managed to integrate the chat service in my existing app, however everything works because it’s all at localhost. What I want to do is to move the server side to my domain (the same server where I have REST api for the existing app), and rebuild the client side for mobile deployment.
I really don’t know how to do that… it should be very simple, but I don’t know how to say to the client where is the meteor server.
I have already moved my code to the server, and started it. Since I need to fix this thing fast,
I haven’t use deployment yet… I’ve just copied files to the server, and started it. I’ll then study the whole deployment process, and maybe restructure the app to be more “meteor compliant”.
Anyway Meteor is now listening on :3000 of my remote server, but how the client could know that?
Thank you, but I don’t think is the solution I am looking for…
I need to just change the sever address… from localhost:3000 it should be http://my_domain:my_port
I’m not sure what your setup is exactly, but you would normally use either --mobile-server (for meteor run) or --server (for meteor build) to specify the server URL. Also make sure you define ROOT_URL on the server, because you won’t be able to use hot code push if you don’t. See the mobile article in the Meteor Guide for more details.
overwriting that line, it seems that it works. Actually I really don’t like this solution… I don’t want to change libraries code in this way, but at least something is working. Do you know a better way to fix this? Should I set my variable AFTER the libraries import?
I’m experiencing similar issues with a deployment to the Play Store, pointing at modulus.io.
I think the something to do with the Hot Code Push feature… which updates index.html to defaults. Including the ROOT_URL which is based on the DDP_DEFAULT_CONNECTION_URL. Did you have any success with your issues?