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

Take Meteor ROOT_URL - setting into account when generating URLs and routing #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DanielDornhardt
Copy link

Hello, I finally got around to update the project I needed this for to IronRouter 1.0+ ... unfortunately the patches I did for the old branch didn't work anymore, so I re-did the "incorporation of the ROOT_URL subdirectory" - fix.

It's not an elegant thing, unfortunately I didn't get around to study the whole Middleware-Concept and if it could help me. I did the patches and tested URL generation and route resolution as far as I could using my project, and it seems to be working alright.

The patch is done solely updating Iron.Url, but of course the Iron Router needs to be updated to reference the newer Iron.Url - package.

Unfortunately I couldn't just create a new fork of Iron-Router using my github account because I already have a fork (and github wants to create the fork with the same name as the original repo, so that's a problem there) and apparently I can't create a pull request from my "custom-cloned and then pushed to gitbub" - clone of IronRouter, but here's the pull request and the changes which would need to be made to IronRouter: https://github.com/DanielDornhardt/iron-router-2/compare/incorporateMeteorROOT_URLSetting?expand=1

It'd be great if somebody would look this over and then merge it into IronRouter proper?

Please let me know if there is something which would need to be changed for this to be accepted, I'd find it very useful and reasonable to have this supported by Iron-Router.

Thanks and best wishes

Daniel :)

@DanielDornhardt
Copy link
Author

Alright, please put this on hold for another day or two, I'm still ironing out some issues

@DanielDornhardt
Copy link
Author

Hahaha, Ironing out! Didn't catch that myself! Anyhow, I patched a last bug in Iron:Router: DanielDornhardt/iron-router-2@fe2da77 - which prevented this from working correctly in some cases. Now the ROOT_URL - Support including subdirectories on the server should be working...

Together with these changes in Iron:Router: https://github.com/DanielDornhardt/iron-router-2/compare/incorporateMeteorROOT_URLSetting?expand=1

Best wishes

Daniel

@awatson1978
Copy link

Wound up implementing this solution in clinical:router, available on Atmosphere:
https://atmospherejs.com/?q=clinical%3Arouter

Command line installation includes:

meteor add clinical:router

And support for including in packages...

api.use('clinical:[email protected]');

@levino
Copy link

levino commented May 19, 2016

Why has this not been merged?

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

Successfully merging this pull request may close these issues.

3 participants