Thomas Denney

Minor site update

Over the past few days I’ve been migrating from Squarespace to a self-hosted site. If I’ve done this correctly, you should only notice a few minor visual changes.

The server now runs on DigitalOcean, with a NodeJS backend written in TypeScript. I’d hoped to avoid writing any server side code, either by generating a static site with Jekyll or by using a CMS, but Squarespace has irregular URLs. For example, dates can be written with any number of digits. I didn’t fancy learning whichever CMS happens to be cool today, so writing a little NodeJS wasn’t onerous.

Writing in TypeScript and using Visual Studio Code made my life a lot easier. They work great together, especially with IntelliSense and debugging. I would recommend doing the following:

  • If you’re using any NPM modules, make sure you have DefinitelyTyped definitions

  • If there isn’t a DefinitelyTyped definition, make sure you import via let module = require('module') rather than import module = require('module') because otherwise TypeScript will throw an error

  • Use tsc --watch to auto-recompile files

If you notice any broken URLs, please contact me so that I can fix them.