Reputation: 10287
I want to serve a meteor multi-page app off mysite.com/meteorapp/...
rather than mysite.com/...
.
Since I have lots of pages, I don't want to write something like
base = '/meteorapp/';
this.route('about-us', {
path: base+'about-us',
template: 'about-us'
});
for every single page.
Is there a way to set a "base" that is prefixed to all the routes?
Upvotes: 1
Views: 943
Reputation: 19544
With the solution you propose, you'll still have problems with /public
dir (files from there would be served on any path they appear). Plus, Meteor would still interact with all other requests, which is probably not what you need.
The best way to solve this would be on server configuration level. Run meteor on a certain port, then proxy all the requests you want to (and only those) to that port.
You'll also need to set up the proper ROOT_URL so that it points to the subfolder.
Upvotes: 2