fake server json code example
Example 1: json server
npm install -g json-server
Example 2: db.json
json-server --watch db.json
Example 3: dummy api json
var xhr = new XMLHttpRequest();
xhr.open("GET", "https://reqres.in/api/products/3", true);
xhr.onload = function(){
console.log(xhr.responseText);
};
xhr.send();