The script index.js
uses a local api to perform various operations on a set of cities. Your task is to implement an api so that the script runs successfully all the way to the end.
Run npm install
and npm run start
to start the script.
Your api can load the required data from here.
In the distance calculations you can assume the earth is a perfect sphere and has a radius is 6371 km.
Once you are done, please provide us with a link to a git repo with your code, ready to run.