In the present, web services almost build based on microservice architecture, separate front end node app and back end api, this will cause cors issue while developing and distributing production, that's go through some basic solution for dealing with cors.
By default json-server is launch with cors enabled, so directly fetch data from API server.