I\'m trying something simple where I make a request from the front end of my app using the fetch API like so
let request = new Request(\'http://localhost:3000/a
Okay, this works on my front end
fetch(request).then((response) => {
console.log(response);
response.json().then((data) => {
console.log(data);
});
});
The key part was the resolution of the promise chain.
Similar question here JavaScript fetch API - Why does response.json() return a promise object (instead of JSON)?