Closed pinksy closed 11 years ago
Also check out the new targeted build stuff I wrote in. That might help a lot.
Ok, thanks Tim. I haven't had chance to try out the Apache config suggestions (been busy with some amqp stuff), but will give it a go. Oh, and happy Christmas!
I've installed github-viewer to a sub-directory on my Apache server (i.e., not through the provided node server) at http://www.pinksy.co.uk/backbone/github-viewer/. It works, but the URL contains repeated sub-paths when the buttons are clicked.
I followed the notes at https://github.com/tbranyen/backbone-boilerplate/wiki/Relative-path-setup-notes to tweak it for relative paths, with the following changes:
i. Change index.html to use relative paths instead of absolute paths:
ii. Change the routes.
iii. Change the root property in the Backbone.history.start call in main.js.
iv. Change the path for the $.get call in the fetch function of Backbone.LayoutManager.configure in app.js.
I also seemed to need to make the following additional changes:
v. Convert app.styl to app.css using the stylus tool, and change the @import in index.css accordingly
vi. Change the prefix field of Backbone.LayoutManager.configure in app.js.
vii. Change the router calls in repo.js and user.js.
viii. Change the img src in repo.js and user.js.
I did note issue 1, which suggests that only the root property in the Backbone.history.start call in main.js needs to change, and the routes don't need to change, but that didn't seem to work.
So the page renders fine, but when you click on the search button for example, the URL changes to:
http://www.pinksy.co.uk/backbone/github-viewer/backbone/github-viewer/org/matchbox
instead of the expected:
http://www.pinksy.co.uk/backbone/github-viewer/org/matchbox
Have I done something wrong? I've copied it up uncompiled, so you're welcome to dig down into the scripts and have a look at my changes!
Thanks