diff --git a/README.md b/README.md
index 2b7c883..61e2dcd 100644
--- a/README.md
+++ b/README.md
@@ -27,10 +27,8 @@ Then in a web browser, navigate to `your_machines_ip_address:8080`.
## TODO
Add New Content
-- NOTICE
- HEALTH (My Priorities Sheet)
- How to host files? Put them in reverse-proxy's files.hyperling.com site?
-- STANCE
- JOURNEY
## Inspiration
diff --git a/main.js b/main.js
index 8793957..37bc194 100755
--- a/main.js
+++ b/main.js
@@ -29,9 +29,15 @@ ports.push(8080);
//// Functions ////
+/* Code exists inside a main function so that we may use async/await.
+*/
async function main() {
console.log("...Starting Main...");
+ // Getting dates in Node.js is awful, just use Linux.
+ const start_datetime = "" + await execSync('date "+%Y-%m-%dT%H:%M:%S%:z"');
+ const start_datetime_trimmed = start_datetime.trim();
+
console.log("Set app to return HTML documents.");
app.use(function (req, res, next) {
res.contentType('text/html');
@@ -59,28 +65,113 @@ async function main() {
console.log(" * Pages loaded: ", pages);
//return; // Stop execution FORTESTING
+ /* Create both an XML and HTML sitemap based on these entries. XML is used for
+ // bots like SEO scrapers. HTML will be for human users looking for a list of
+ // all pages. Some are not in the menu. Generated an example XML sitemap at
+ // www.xml-sitemaps.com then stripped it apart and made it dynamic.
+ */
+ let sitemap_xml = `
+
+
+ Web Pages (Alphabetical)
+
+ `;
+
console.log("...Adding Routes...");
let router = express.Router();
- /* AUTOMATIC METHOD BASED ON OBJECT/ARRAY OF PHP scripts
+ /* AUTOMATIC METHOD BASED ON OBJECT/ARRAY OF WEB SCRIPTS
// Creates routes with the URL of the key and location of the value.
*/
for (let key in pages) {
console.log(" * Creating router for", key);
router.get("/" + key, function (req,res) {
console.log(key, "fulfilling request to", req.socket.remoteAddress, "asking for", req.url)
- res.send(execSync(pages[key]));
+ res.send("" + execSync(pages[key]));
});
+
+ /* Append the page to the sitemap variables.
+ */
+ console.log(" * * Adding to sitemap.xml");
+ sitemap_xml = sitemap_xml + `
+
- Currently I reside in the US state of Indiana and am working to move + As of 2022 I reside in the US state of Indiana and am working to move to the southwest for the following reasons:
The search will begin in Arizona. Colorado and Mexico will likely - be explored. New Mexico and other locations will be visited as well - but have not yet revealed areas which offer exactly what I'm looking - for. + be explored. New Mexico and other locations will be visited as well.
diff --git a/pages/contact.php b/pages/contact.php index 687b84c..3828143 100755 --- a/pages/contact.php +++ b/pages/contact.php @@ -4,7 +4,7 @@ ?>+ [ TBD, check back soon. ] +
+