Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't override Meteor absoluteUrl?

Tags:

windows

meteor

I'm trying to override the absoluteUrl in combination with a deployment on a Windows server.

On the server in Meteor.startup I'm doing this:

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

Calling Meteor.absoluteUrl() in the console returns: http://localhost:3000.

Any suggestions are most welcome. Doing this Meteor.absoluteUrl({replaceLocalhost:true}); also doesn't have any effect at all.

like image 347
Vindberg Avatar asked Mar 21 '13 07:03

Vindberg


1 Answers

Try:

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

In your Meteor.startup. If its not for individualizing settings you can also use the environmental variable ROOT_URL

like image 85
Tarang Avatar answered Sep 22 '22 15:09

Tarang