Update 'server.js'
This commit is contained in:
parent
2fe3229317
commit
252e26cd22
11
server.js
11
server.js
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user