As someone new to node.js, I am attempting to retrieve a json file from a specific url (e.g. 'http://www.example.com/sample_data.json'). My objective is to fetch the file just once when the server initializes and then store it locally on the client side for future manipulation. I attempted
var file = request('http//exmaple.com/sample_data.json')
however, this resulted in an error regarding import modules. Any guidance on how to begin would be greatly appreciated! Many thanks