diff --git a/server.js b/server.js index 4e53f57..2dae55b 100644 --- a/server.js +++ b/server.js @@ -49,9 +49,23 @@ setInterval(function () { }); res.on("end", () => { console.log("end"); - }); }); + }); + }); }, 60000); +setInterval(function () { + http.get("http://localhost/api/auto-gen-feature", res => { + var body = ''; + res.on("data", function(chunk) { + body += chunk; + }); + res.on("end", () => { + var fbResponse = JSON.parse(body); + console.log("Got a response: ", fbResponse.picture); + }); + }); +}, 120000); + console.log('BiFace Started On Port: ' + port); module.exports = app;