mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Cleanup more callback things (#3051)
Looks quite stable on my computers, so maybe we give it a try? --------- Co-authored-by: veeck <michael@veeck.de>
This commit is contained in:
@@ -9,6 +9,9 @@ const path = require("path");
|
||||
const ipfilter = require("express-ipfilter").IpFilter;
|
||||
const fs = require("fs");
|
||||
const helmet = require("helmet");
|
||||
const socketio = require("socket.io");
|
||||
const http = require("http");
|
||||
const https = require("https");
|
||||
|
||||
const Log = require("logger");
|
||||
const Utils = require("./utils.js");
|
||||
@@ -38,11 +41,11 @@ function Server(config) {
|
||||
key: fs.readFileSync(config.httpsPrivateKey),
|
||||
cert: fs.readFileSync(config.httpsCertificate)
|
||||
};
|
||||
server = require("https").Server(options, app);
|
||||
server = https.Server(options, app);
|
||||
} else {
|
||||
server = require("http").Server(app);
|
||||
server = http.Server(app);
|
||||
}
|
||||
const io = require("socket.io")(server, {
|
||||
const io = socketio(server, {
|
||||
cors: {
|
||||
origin: /.*$/,
|
||||
credentials: true
|
||||
|
Reference in New Issue
Block a user