Can't override Meteor absoluteUrl?

I am trying to override absoluteUrl in conjunction with a deployment to a Windows server.

On the server in Meteor.startup, I do this:

Meteor.absoluteUrl({rootUrl: "http://example.com"});

Call Meteor.absoluteUrl () returns to the console: http://localhost:3000.

Any suggestions are welcome. Doing this Meteor.absoluteUrl ({replaceLocalhost: true}); also has no effect.

+5
source share
1 answer

Try:

Meteor.absoluteUrl.defaultOptions.rootUrl = "http://mydomain.com"

In your Meteor.startup. If this is not to personalize settings, you can also use the environment variableROOT_URL

+5
source

All Articles