In this post I’ll guide you through the process of setting up your Node.js application and building the script to call a server API which returns a JSON object, and ultimately iterate through its contents.
Let’s dive right into it and set your Node.js project. Inside your project directory, type the node package manager initializer:
Ok, now let’s get a npm package that’ll help us deal with HTTP requests later on, namely, node-fetch.
_>npm install node-fetch
Great! Now lets get to the entrails of the script next, yummy!
Within your project’s folder create a file (ie.: ‘fetchData.js’), and…
Full Stack Developer