title: Node.js /Express and mongoose: Make an "observable" mongodb Connection with automatic pull on new Data?
body: <p>I am using MEAN Stack, and I am doing an asynchronous request to my mongodb database with mongoose. I now have a chart in the angular frontend, that displays some data from a mongodb query. The thing is, the data gets updated every 1 minute, and I want to automatically pull and refresh the chart every 15 minutes.
  Is it somehow possible to reflect this in an automatic way in mongoose? Or how would one generally realize this? I think there are different approaches:</p>
  
  <p>1.I could do a http request every 15 Minutes in Angular frontend, but thats probably not good style, as I heard, http requests are observables that kind of build a socket stream to your source api, is that true?</p>
  
  <p>2.If those observables keep track of changes, there is still no connection between keeping track of new data inside mongodb with mongoose and the frontend (Frontend does not know anything about new data, as the data is send from the API). I could try some kind of "push" or refresh with timer that triggers an api request and executes the api function every 1 minute or so from the backend, but I don't know how to do it as Promises are one-time triggered only and not observables... maybe this works with callbacks?  How is that done in Node.js /Express and mongoose?</p>