var url = 'http://localhost:3000/api/products'; fetch(url) .then(res => res.json()) .then(res => { console.log(res ); });