diff --git a/README.md b/README.md index e9b1b7a..b4153a4 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ smoothly when you don't have a deck, or when you and your friends are together v Ultimate Werewolf and by 2020's quarantine. The app is free to use and anonymous. +![player](./client/src/images/screenshots/player.PNG) + ## Features This is meant to facilitate a game through a shared game state and various utilities - not to control diff --git a/client/src/images/screenshots/moderator.PNG b/client/src/images/screenshots/moderator.PNG new file mode 100644 index 0000000..aca32b0 Binary files /dev/null and b/client/src/images/screenshots/moderator.PNG differ diff --git a/client/src/images/screenshots/player.PNG b/client/src/images/screenshots/player.PNG new file mode 100644 index 0000000..79d25c7 Binary files /dev/null and b/client/src/images/screenshots/player.PNG differ diff --git a/server/main.js b/server/main.js index 22ada28..94f97e5 100644 --- a/server/main.js +++ b/server/main.js @@ -14,7 +14,7 @@ app.use(bodyParser.urlencoded({ const args = ServerBootstrapper.processCLIArgs(); const logger = require('./modules/Logger')(args.logLevel); -logger.log('LOG LEVEL IS: ' + args.logLevel); +logger.info('LOG LEVEL IS: ' + args.logLevel); const main = ServerBootstrapper.createServerWithCorrectHTTPProtocol(app, args.useHttps, args.port, logger) @@ -66,5 +66,5 @@ app.use(function (req, res) { }); main.listen(args.port, function () { - logger.log(`Starting server on port ${args.port}` ); + logger.info(`Starting server on port ${args.port}` ); }); diff --git a/server/modules/ActiveGameRunner.js b/server/modules/ActiveGameRunner.js index 38b9851..ba0d32a 100644 --- a/server/modules/ActiveGameRunner.js +++ b/server/modules/ActiveGameRunner.js @@ -64,7 +64,7 @@ class ActiveGameRunner { class Singleton { constructor (logger) { if (!Singleton.instance) { - logger.log('CREATING SINGLETON ACTIVE GAME RUNNER'); + logger.info('CREATING SINGLETON ACTIVE GAME RUNNER'); Singleton.instance = new ActiveGameRunner(logger); } } diff --git a/server/modules/GameManager.js b/server/modules/GameManager.js index 36822aa..9c838fc 100644 --- a/server/modules/GameManager.js +++ b/server/modules/GameManager.js @@ -450,7 +450,7 @@ function pruneStaleGames(activeGames, timerThreads, logger) { class Singleton { constructor (logger, environment) { if (!Singleton.instance) { - logger.log('CREATING SINGLETON GAME MANAGER'); + logger.info('CREATING SINGLETON GAME MANAGER'); Singleton.instance = new GameManager(logger, environment); } } diff --git a/server/modules/Logger.js b/server/modules/Logger.js index 50b09d6..49429be 100644 --- a/server/modules/Logger.js +++ b/server/modules/Logger.js @@ -3,7 +3,7 @@ const globals = require('../config/globals'); module.exports = function (logLevel = globals.LOG_LEVEL.INFO) { return { logLevel: logLevel, - log (message = '') { + info (message = '') { const now = new Date(); console.log('LOG ', now.toGMTString(), ': ', message); }, diff --git a/server/modules/ServerBootstrapper.js b/server/modules/ServerBootstrapper.js index 3233c15..a946de3 100644 --- a/server/modules/ServerBootstrapper.js +++ b/server/modules/ServerBootstrapper.js @@ -38,7 +38,7 @@ const ServerBootstrapper = { createServerWithCorrectHTTPProtocol: (app, useHttps, port, logger) => { let main; if (process.env.NODE_ENV.trim() === 'development') { - logger.log('starting main in DEVELOPMENT mode.'); + logger.info('starting main in DEVELOPMENT mode.'); if ( useHttps && fs.existsSync(path.join(__dirname, '../../client/certs/localhost-key.pem')) @@ -46,13 +46,13 @@ const ServerBootstrapper = { ) { const key = fs.readFileSync(path.join(__dirname, '../../client/certs/localhost-key.pem'), 'utf-8'); const cert = fs.readFileSync(path.join(__dirname, '../../client/certs/localhost.pem'), 'utf-8'); - logger.log('local certs detected. Using HTTPS.'); + logger.info('local certs detected. Using HTTPS.'); main = https.createServer({ key, cert }, app); - logger.log(`navigate to https://localhost:${port}`); + logger.info(`navigate to https://localhost:${port}`); } else { - logger.log('https not specified or no local certs detected. Certs should reside in /client/certs. Using HTTP.'); + logger.info('https not specified or no local certs detected. Certs should reside in /client/certs. Using HTTP.'); main = http.createServer(app); - logger.log(`navigate to http://localhost:${port}`); + logger.info(`navigate to http://localhost:${port}`); } } else { logger.warn('starting main in PRODUCTION mode. This should not be used for local development.');