set up background process in express app code example
Example 1: set up background process in express app
function populateDatabase() {
//connect to streaming API
//populate database
}
module.exports = populateDatabase;
Example 2: set up background process in express app
//app.js
var populateDatabase = require("./listen");
setInterval(60 * 1000, populateDatabase);
// rest of app setup/start code