'How to download the latest dataset from Heroku hosted Express server

I have an express app hosted on Heroku with 2 end points that just point to 2 JSON files:

https://kingpongscores-server.herokuapp.com/players

https://kingpongscores-server.herokuapp.com/games

I have a version of this on Github (which is deploys from) and I want to update that repo so I can pull the latest data to my local, before making any changes.

The reason is at the moment if I add an end point/make a functionality change and push, I will override all the data on the Heroku server with the version I have locally.

Lastly, I realise I could just go to those end points and copy the data, but I'm going to have multiple versions of this server hosted at once, and going to be making lots of changes, so I don't want to do it manually.

Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source