Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting Subdirectory as ROOT_URL? #315

Closed
totorokk opened this issue Sep 9, 2015 · 5 comments
Closed

Supporting Subdirectory as ROOT_URL? #315

totorokk opened this issue Sep 9, 2015 · 5 comments

Comments

@totorokk
Copy link

totorokk commented Sep 9, 2015

I'm deploying two apps on the same server/base domain, using nginx to handle the proxy to subdirectories. e.g. http://mydomain.com/appOne and http://mydomain.com/appTwo.

But I think when FR resolves the url, the subdirectories of ROOT_URL are stripped off. So if I want a route "http://mydomain.com/appOne/login" with ROOT_URL="http://mydomain.com/appOne", I still need to config route "/appOne/login" instead of "/login".

The issue originally comes from the npm "url" package. But would FR be supporting subdirectory in the future, or we should stick with the above work-arounds for this?

@arunoda
Copy link
Contributor

arunoda commented Sep 9, 2015

What I suggest it to create a Group route. Create is based on the Meteor.settings. I mean get the prefix from the Meteor.settings.

So, locally you can run it with "/" and when deploying you can set it to whatever you want.

@totorokk
Copy link
Author

Got it. I'll use group prefix instead of changing the way url gets resolved. Thanks!

@arunoda
Copy link
Contributor

arunoda commented Sep 10, 2015

Awesome.. Hope we can close this.

@arunoda arunoda closed this as completed Sep 10, 2015
@mquandalle
Copy link
Contributor

Hum, I also encounter this problem in Wekan (cf. wekan/wekan#133) with the difference that I'm not fully controlling the production environment in case people are self-hosting the application.

From meteor/meteor#2067, it seems to me that flow-router should handle this subdirectory parameter exposed by Meteor.

@arunoda
Copy link
Contributor

arunoda commented Sep 20, 2015

Hmm. Good idea.
Could you send me a PR?

Here's the place to add it: https://github.com/kadirahq/flow-router/blob/master/client/router.js#L367
(You can easily do this buy adding a pagejs option: https://goo.gl/jgpidT - I assume it'll work)

mquandalle added a commit to mquandalle/flow-router that referenced this issue Sep 21, 2015
mquandalle added a commit to mquandalle/flow-router that referenced this issue Sep 21, 2015
mquandalle added a commit to mquandalle/flow-router that referenced this issue Sep 21, 2015
mquandalle added a commit to mquandalle/flow-router that referenced this issue Sep 21, 2015
mquandalle added a commit to mquandalle/flow-router that referenced this issue Sep 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants