set up background process in express app

JavaScript
//app.js
var populateDatabase = require("./listen");
setInterval(60 * 1000, populateDatabase);
// rest of app setup/start codefunction populateDatabase() {
  //connect to streaming API
  //populate database
}

module.exports = populateDatabase;
Source

Also in JavaScript: