Add TBD's of how to better output in the log.

This commit is contained in:
Hyperling 2025-05-27 11:27:06 -07:00
parent b4d9bae246
commit aa20bd67ee

View File

@ -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)