Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

changing ROOT_URL for meteor app

Tags:

meteor

I am trying to get my app to run behind an NGINX reverse proxy and had some minor success.

the path is http://dev.sertal.ch/myApp and the application is accessible.

The issue I am still facing is that the images in the public folder are not accessible without hard coding myApp at the start of the URL. This is especially an issue for URLs inside the CSS.

like image 624
Micha Roon Avatar asked Feb 18 '14 06:02

Micha Roon


2 Answers

You would want to set the ROOT_URL environment variable when you start your meteor app. If you are using meteor to start from the command line in your app's directory it would be like this:

ROOT_URL=http://dev.sertal.ch/myApp meteor 
like image 170
user728291 Avatar answered Oct 11 '22 13:10

user728291


Meteor has a ROOT_URL property which you must explicitly set for your bundled applications.

It is in the form of Meteor.absoluteUrl([path], [options]) and the path argument is exactly what you're looking for, excerpt from the docs:

A path to append to the root URL. Do not include a leading "/".

Check here for details on options http://docs.meteor.com/#/full/meteor_absoluteurl

like image 26
Serkan Durusoy Avatar answered Oct 11 '22 12:10

Serkan Durusoy