URL issues with sample code

25 views
Skip to first unread message

Tom Freudenheim

unread,
Feb 2, 2015, 4:21:55 PM2/2/15
to osci-t...@googlegroups.com
Hi,

I set up my dev environment at a site called "osci.dev".

I've run into some issues where there are absolute paths to http://osci_tk.localhost/ and to http://localhost/osci

I'm trying to figure out the best fix for this -- should I make all of the paths root relative, or did you want to simulate an environment where there are 2 different sites, one for the backend and one for the front end?

I could also try to make the paths relative if you are assuming one site and would prefer that.

Also, I see that in another spot there are root relative  URLs like this:
endpoints: {
'OsciTkNote': '/osci_tk/api/notes/',
'OsciTkSearch': '/osci_tk/api/search/',
'OsciTkOpenSearch': '/osci_tk/api/opensearch/',
'OsciTkAccount': '/osci_tk/api/users/',
'OsciTkCitation': '/osci_tk/api/citations/'
},

I don't have anything called /osci_tk/ but I beleive /api works due to   While I can make changes to fix this for me, I'm wondering what the best solution would be for distributing this code (what I should include in a pull request) -- should there be some config param with the prefix? should there be an alias as part of the install, similar to the frontend alias? it seems a bit odd to alias /osci_tk/ to /

Tom

Kyle Jaebker

unread,
Feb 3, 2015, 4:40:41 PM2/3/15
to osci-t...@googlegroups.com
Tom,

Those urls should be able to be made relative to the site. The API’s are generated from drupal, so if you site is… http://myosciinstall.com and you are not operating off of a sub-directory. Then you should be able to set those endpoints to /api/notes/ and remove the /osci_tk part

Hope that helps.

Kyle

--
You received this message because you are subscribed to the Google Groups "OSCI-Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osci-toolkit...@googlegroups.com.
To post to this group, send email to osci-t...@googlegroups.com.
Visit this group at http://groups.google.com/group/osci-toolkit.
For more options, visit https://groups.google.com/d/optout.

This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact Kyle Jaebker by reply email and destroy all copies of the original message.

Tom Freudenheim

unread,
Feb 3, 2015, 6:51:05 PM2/3/15
to osci-t...@googlegroups.com
Yes, that is what I have done, and it’s working now!

I put in a pull-request with my changes. I believe part of this may be a “breaking change” for some developers, so I understand if you don’t do the pull.

Tom

You received this message because you are subscribed to a topic in the Google Groups "OSCI-Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/osci-toolkit/QuDt7FKThko/unsubscribe.
To unsubscribe from this group and all its topics, send an email to osci-toolkit...@googlegroups.com.

Kyle Jaebker

unread,
Feb 4, 2015, 2:05:22 PM2/4/15
to osci-t...@googlegroups.com
Great, we will review the changes in the pull request and see if it makes sense to change. This might be one of the areas that just needs better documentation.
Reply all
Reply to author
Forward
0 new messages