Update 'server.js'

This commit is contained in:
dongpd 2020-12-22 07:48:50 +00:00
parent 2fe3229317
commit 252e26cd22

View File

@ -6,6 +6,7 @@ var express = require('express'),
port = 4004,
bodyParser = require('body-parser'),
jsonwebtoken = require("jsonwebtoken");
const http = require("http");
app.use(bodyParser.urlencoded({extended: true}));
app.use(bodyParser.json({limit: '50mb'}));
@ -41,6 +42,16 @@ io.sockets.on('connection', function (socket) {
});
});
setInterval(function () {
http.get("http://localhost/api/sync", res => {
res.on("data", d => {
});
res.on("end", () => {
console.log("end");
}); });
}, 60000);
console.log('BiFace Started On Port: ' + port);
module.exports = app;