Using backbone, I’d like to fetch data from a couchdb server that is in the same domain as the server that is running the app. The couchdb server is running on its default port. Does backbone implement functionality that can do this? I suppose all I need to do is specify the port but I can’t seem to find where this functionality exists in backbone. Any help would be appreciated. Thanks!
Also, to note, I’m fully aware that I can make a request from the server to couchdb, when the server gets a request. But this seems like an indirect way of handling things, especially since couchDB offers an HTTP interface.
Since
Backbone.syncis usingjQuery.ajax, which in turn is usingXHR, you cannot fetch data from the same domain with another port number due to Same origin policy.