const fetch = require('node-fetch');
const url = 'https://gist.githubusercontent.com/gcollazo/884a489a50aec7b53765405f40c6fbd1/raw/49d1568c34090587ac82e80612a9c350108b62c5/sample.json';
fetch(url)
.then(res => res.json())
.then(data => {
my_data = data;
});
URL is randomly taken from the Internet.
ERROR:
Invalid REPL keyword
> .then(data => {
Invalid REPL keyword
> my_data = data;
Thrown:
ReferenceError: data is not defined
> });
Thrown:
});