json-server
json-server copied to clipboard
Serving local json files
Hi,
I cannot seem to get the server to return me some static JSON files (I get a CORS error).
Server is setup as:
/server/
survey.json
/server/public/
example.json`
I start the server with
json-server --watch survey.json --static public
The calls to the watched file work fine, but calls to example.json do not.
$.get('http://localhost:3000/public/example.json', function () {
debugger;
});
Any ideas what I am doing wrong here?