In backbone, how can I point my entities to an external endpoint?
For example, my app is running on http://myapp.com
And I want it to use the followgin rest web service
http://external.com/api/rest/xxxx
I tried with urlRoot property but it doesn't seem to work that way
Sagan.FeatureModel = Backbone.Model.extend({
defaults: {
name: "New Feature",
parent: "",
enabled: false
},
urlRoot: 'http://localhost:9001/',
url: 'features'
});
For testing purposes the app is hosted on localhost:9000, and the external webservice at localhost:9001.
backbone seems to still be pointing at localhost:9000 instead of 9001