Unfortunately setting a model base URL is not a built in feature yet but planned for the next minor release. This is how I usually do it at the moment:
function getUrl(url, method) {
method = method || 'GET';
return method + ' ' + BASE_URL + '/' + url;
}
Wine = can.Model({
findAll : getUrl('api/wines');
findOne : getUrl('api/wines/{id}'),
create : getUrl('api/wines', 'POST'),
update : getUrl('wines/{id}', 'PUT'),
destroy : getUrl('api/wines/{id}', 'DELETE')
},{
});
getUrl
can be a Model static method or located in a better spot (e.g. application bootstrap) as well.