I have an web app that I am transiting into a trigger.io application.
I am trying to get it to work as a single page app, and currently, it is fraught with issues.
One of my issues right now is that this is how we set the url for api calls:
Muse.prototype.url = function() {
return "/answers/" + this.id + ".json";
};
Obviously, it will use the root (localhost) and call
http://localhost:3000/answers/slug
But since it is a single file, it calls
file:///file_path/answers/slug
Which would obviously fail.
How do I get it to use a root of my definition WITHOUT changing the root of the backbone routes?
You can override sync method: