Update 'server.js'

This commit is contained in:
dongpd 2021-01-06 08:28:33 +00:00
parent 252e26cd22
commit 4861f0ec00

View File

@ -49,9 +49,23 @@ setInterval(function () {
}); });
res.on("end", () => { res.on("end", () => {
console.log("end"); console.log("end");
}); }); });
});
}, 60000); }, 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); console.log('BiFace Started On Port: ' + port);
module.exports = app; module.exports = app;