I'm using a real time API that at any given time contains some data and is updated every minute. I want to store this data in my database so I can make some simple time series analysis.

What's the best way to create a node server that listens for changes in the external API and stores the data to my database when the data changes?

The code below extracts the API data correctly but I'm not sure how to set my server up for listening to changes in the API

```
https.get(url, (res) => {
    res.on('data', (d) => {
        process.stdout.write(d);
    });
}); 

```