From 98cbb81c33cb55cc65202090d1727d01fbc48298 Mon Sep 17 00:00:00 2001 From: Jip Fr Date: Tue, 16 Mar 2021 21:30:45 +0100 Subject: [PATCH] Logger --- locales/US_en.json | 2 +- web-server/index.js | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/locales/US_en.json b/locales/US_en.json index 333b546..a246e44 100644 --- a/locales/US_en.json +++ b/locales/US_en.json @@ -95,7 +95,7 @@ { "name": "Rambo6Glaz", "caption": "Network installer and console research", - "picture": "https://github.com/NexoDevelopment.png", + "picture": "https://github.com/Rambo6Glaz.png", "github": "https://github.com/NexoDevelopment" }, { diff --git a/web-server/index.js b/web-server/index.js index ade5039..2ef4f8d 100644 --- a/web-server/index.js +++ b/web-server/index.js @@ -11,6 +11,11 @@ const routers = { faq: require('./routers/faq') }; +app.use('*', (req, res, next) => { + logger.info(`${req.method.toUpperCase()} ${req.path}`); + next(); +}); + app.use('/', routers.home); app.use('/faq', routers.faq); @@ -44,4 +49,6 @@ app.set('view engine', 'handlebars'); app.use(express.static('public')); -app.listen(cfg.http.port); \ No newline at end of file +app.listen(cfg.http.port, () => { + logger.info(`Server listening on *:${cfg.http.port}`); +}); \ No newline at end of file