Simone M
Simone M

Reputation: 687

Meteor ios app get wrong server on code refresh

Using command

meteor run ios-device --mobile-server http://192.168.2.126:3000

works fine, but when i do an update to the code of my app while this command is running, it correctly refresh code in the application but pointing to a wrong data source, returning this error on the app:

Failed to load resource: Could not connect to the server. http://localhost:3000/sockjs/info?cb=fpbx3y94_g

But in meteor run i said that server is http://192.168.2.126:3000 !!

Why this happened?? What's wrong with my application config?

Upvotes: 0

Views: 202

Answers (1)

Simone M
Simone M

Reputation: 687

Solved!!

if (Meteor.isServer) {
Meteor.startup(function () {
// code to run on server at startup
process.env.MOBILE_DDP_URL = 'http://192.168.1.151:3000';
process.env.MOBILE_ROOT_URL = 'http://192.168.1.151:3000';
});
}

Upvotes: 0

Related Questions