removed unused packages

This commit is contained in:
Jan Prochazka
2021-12-22 16:34:34 +01:00
parent 318b137490
commit 2ff9e8c452
5 changed files with 1 additions and 52 deletions

View File

@@ -4,7 +4,6 @@ const bodyParser = require('body-parser');
const fileUpload = require('express-fileupload');
const http = require('http');
const cors = require('cors');
// const io = require('socket.io');
const fs = require('fs');
const getPort = require('get-port');
const childProcessChecker = require('./utility/childProcessChecker');
@@ -44,11 +43,6 @@ function start() {
const server = http.createServer(app);
// const sse = new SSE();
// app.get('/stream', sse.init);
// socket.set(sse);
// socket.set(io(server));
if (process.env.LOGIN && process.env.PASSWORD) {
app.use(
basicAuth({
@@ -97,16 +91,6 @@ function start() {
// Tell the client to retry every 10 seconds if connectivity is lost
res.write('retry: 10000\n\n');
socket.set(res);
// let count = 0;
// while (true) {
// await new Promise((resolve) => setTimeout(resolve, 1000));
// console.log("Emit", ++count);
// // Emit an SSE that contains the current 'count' as a string
// res.write(`event: ping\ndata: ${JSON.stringify({ count })}\n\n`);
// }
});
app.use(bodyParser.json({ limit: '50mb' }));