About the author

Hi, I'm Ben. I've been trying to make computers do things I want them to do for years.

Over the last decade people have been paying me to get computers to do things they want them to do as well.

Want to get in touch? You can reach me on hi.ben@dartoxia.com (...wtf is a dartoxia?)

How was StuckAt.WTF built with $2.88?

Created on: 2020-05-20 16:34

When I first built this site (around 5 days ago!) I was keen to basically spend no money. I wanted to be able to work quickly with some tools I was already a bit familiar with (react, typescript).

It seemed like I could probably eliminate all costs, except domain registration, by:

  • Make a statically built site with Next.js.
  • Publish builds to Firebase.
  • Serve access to the site using Cloudflare's CDN.

The only cost that I incurred was the $2.88 registration fee for the StuckAt.WTF domain from Porkbun.

It was really quite quick to get something minimal deployed:

  1. I went to porkbun.com and registered the domain StuckAt.WTF.
  2. Updated the nameservers for StuckAt.WTF to point to Cloudflare's nameservers.
  3. I registered for Firebase and made a new project for stuckat.wtf
  4. From the project I had to go Hosting -> Add custom domain to register stuckat.wtf as the domain that would be directing traffic to this site. I followed the instructions to add A records to direct traffic from cloudflare
  5. Roughly following the steps below I made a demo Next.js app and deployed it to firebase
npm init next-app
npm --save-dev install typescript @types/react @types/node
npm install -g firebase-tools
firebase init
firebase deploy

After this I had a demo app deployed to Firestore accessible over https://stuckat.wtf.

To avoid any pricing tiers, the site is served by the free tier Cloudflare CDN using CNAME records. It is configured with 'Strict' security, which means SSL is enforced between the client and Cloudflare, and Cloudflare and this site (Cloudflare trusts the Firebase issued cert). Cloudflare automatically upgrades connections to SSL.