hello world 2

now on bare metal!

I am happy to say my blog is back online, with a whole host of changes since the initial setup went live back in 2020. I shut it down somewhere in 2023 due to a mix of boredom and my dismay at Salesforce purchasing (and raising the prices on) my prior SaaS provider, Heroku. This November I decided to get things running again and to do as much of the setup as possible both locally and manually.

The new host: a Dell Optiplex 3050 running Mint

The new host: a Dell Optiplex 3050 running Mint

Hosting a static website seems a basic task in 2024, but I found the process to be very instructive. I'll provide a a brief rundown of how my data ends up on your computer -- hopefully simple enough for the layperson but not too tedious for the technologist:

  1. You type www.strlog.net into a web browser.
  2. This request is translated into an IP address through the Domain Name Service. The DNS process has many steps, but my intervention begins with a DNS provider. I've chosen Cloudflare for this task.
  3. For convienience I also chose Cloudflare as my registrar; I purchased this website name, or Universal Resource Locator (URL) from them for a fee and yearly renewal.
  4. Records I've given Cloudflare resolve (transform) the given URL into my external Internet Protocol address (IP address). The web request is passed on to this IP address.
  5. At this step the web browser has made contact with the Optiplex server above, and the request is recieved by nginx, a program that passes the request from a machine port to my own code.
  6. My code is written in NodeJS, a framework which permits Javascript to run in capacity as a server. Traditionally this language was only used on the "front-end", e.g. on the browser. This code generates the HTML that forms the website structure and style. It is passed back down the chain to nginx and then to your web browser.

Some other configurations were necessary as well:

Setting up a static blog is an uncomplicated task at face value, but the process is repleat with caveats. Doing this work manually lead to a deeper understanding of the technology involved.

There's a bunch left to do -- the site is presentable on mobile (i.e. screens under 800px) but it is not fully navigable. It is not, for example, possible to browse topics. Fixing this will require a deeper rework of routing and the API so I've been putting it off for some time. Also, these posts are written in Markdown, a lightweight language for styling text. I'm serving them with my own Markdown 'parser', but it is just a series of regex replace calls rather than a context-aware parser. For this reason you'll notice the quirks and limitations until I get around to writing a fully-fledged markdown parser. One very visible one is mishandling of parentheses in URLs, which means I have to manually edit them with percent encodings to avoid extra parentheses from showing up.

A project is never finished, but hopefully this one isn't abandoned. ▣

last//next