From aa20bd67ee72aa0f8072fcf7b9b89fee89fd70ea Mon Sep 17 00:00:00 2001 From: Hyperling Date: Tue, 27 May 2025 11:27:06 -0700 Subject: [PATCH] Add TBD's of how to better output in the log. --- main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.js b/main.js index 086746a..f44b4de 100755 --- a/main.js +++ b/main.js @@ -141,6 +141,7 @@ async function main() { /* AUTOMATIC METHOD BASED ON OBJECT/ARRAY OF WEB SCRIPTS // Creates routes with the URL of the key and location of the value. */ + // TBD/TODO would be great to log this as "DATE: ADDRESS hit ROUTER requesting RESOURCE" for (let key in pages) { console.log(" * Creating router for", key); router.get("/" + key, function (req,res) { @@ -182,6 +183,7 @@ async function main() { `; // Provide sitemap.xml file for "SEO". + // TBD/TODO would be great to log this as "DATE: ADDRESS hit ROUTER requesting RESOURCE" console.log(" * Creating router for sitemap.xml"); router.get('/sitemap.xml', function (req, res) { console.log("sitemap.xml being provided to", req.socket.remoteAddress) @@ -190,6 +192,7 @@ async function main() { }); // Provide human-usable sitemap links. + // TBD/TODO would be great to log this as "DATE: ADDRESS hit ROUTER requesting RESOURCE" console.log(" * Creating router for sitemap*"); router.get('/sitemap*', function (req, res) { console.log("sitemap.html being provided to", req.socket.remoteAddress) @@ -197,6 +200,7 @@ async function main() { }); // Return a resource from the files folder. + // TBD/TODO would be great to log this as "DATE: ADDRESS hit ROUTER requesting RESOURCE" console.log(" * Creating router for files"); router.get('/files*', function (req, res) { console.log("file response to", req.socket.remoteAddress, "asking for", req.url)