refactored clock management to server side, basic unit test framework

This commit is contained in:
Alec Maier
2020-05-03 05:55:14 -04:00
parent 7e7977a4c8
commit de0e365ed5
7 changed files with 78 additions and 131 deletions

View File

@@ -5,7 +5,7 @@ const socketIO = require('socket.io');
const app = express();
const server = http.Server(app);
const io = socketIO(server);
const ServerHelper = require('server-helper.js');
const ServerHelper = require('./server-helper.js');
const secure = require('express-force-https');
app.use(secure);
@@ -13,6 +13,9 @@ app.use(secure);
const CronJob = require('cron').CronJob;
const serverHelper = new ServerHelper(CronJob);
const debugMode = Array.from(process.argv.map( (arg)=>arg.trim().toLowerCase() )).includes("debug");
const LOGGER = require("./static/modules/logger")(debugMode);
app.set('port', 5000);
app.use('/static', express.static(__dirname + '/static')); // Routing