From 9566e3232f236a06aea033692064db89e1ccfdc8 Mon Sep 17 00:00:00 2001 From: Rauny Henrique Date: Fri, 21 Feb 2025 20:28:10 -0300 Subject: [PATCH] wip: added requests logs --- index.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/index.js b/index.js index 1c8cca7..b8b241e 100644 --- a/index.js +++ b/index.js @@ -43,20 +43,12 @@ app.engine('json', ejs.renderFile); app.use(morgan('combined')); //// Routes //// +baseRouter.get('/favicon.ico', function (req, res) { + res.sendFile(path_node.join(public_dir, 'favicon.ico')); +}); baseRouter.get('/', function (req, res) { res.render(path_node.join(public_dir, 'index.html'), {title: TITLE, path: PATH, path_prefix: SUBFOLDER}); }); -baseRouter.use('/public/css', express.static(path_node.join(public_dir, 'css'))); -baseRouter.use('/public/js', express.static(path_node.join(public_dir, 'js'))); -baseRouter.get('/public/icon.png', function (req, res) { - res.sendFile(path_node.join(public_dir, 'icon.png')); -}); -baseRouter.get('/favicon.ico', function (req, res) { - var path = path_node.join(public_dir, 'favicon.ico'); - console.log("path: " + path); - - res.sendFile(path); -}); baseRouter.get('/manifest.json', function (req, res) { res.render(path_node.join(public_dir, 'manifest.json'), {title: TITLE, path_prefix: SUBFOLDER}); });