POST http://cofferun-v2-rest-api.herokuapp.com/api/coffeeorders 404 (Not Found)
send @ jquery.js:8630
ajax @ jquery.js:8166
n.(anonymous function) @ jquery.js:8311
RemoteDataStore.add @ remotedatastore.js:14
(anonymous) @ VM63:1
localhost/:1 XMLHttpRequest cannot load http://cofferun-v2-rest-api.herokuapp.com/api/coffeeorders. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:3000’ is therefore not allowed access. The response had HTTP status code 404.
I am geting this error
do i need something else to run heroku?
here is my remotedatastore.js
(function (window) {
‘use strict’;
var App = window.App || {};
var $ = window.jQuery;
function RemoteDataStore(url) {
if(!url) {
throw new Error('No remote URL supplied.');
}
this.serverUrl = url;
}
RemoteDataStore.prototype.add = function(key,val) {
$.post(this.serverUrl, val, function (serverResponse) {
console.log(serverResponse);
});
};
App.RemoteDataStore = RemoteDataStore;
window.App = App;
})(window);
please help