• Started working on Node API using Express
  • Took a cursory look into MongoDB and Prisma (Node ORM)
  • Explored using Insomnia to generate documentation and test my API

A fresh start

Though I know enough JavaScript to get by, I’m much more familiar with Ruby. I already have my toolbox of go-to gems for Ruby projects, eg Rails, ActiveRecord, HTTP, RSpec, etc, but my JS toolbox is pretty empty. I’ve used Express on small side projects before, and a quick internet search confirmed it’s still a reliable JS server framework, but that’s about it. It’s going to take a lot more thought and research to do what takes me a just few minutes with Ruby.

With JavaScript syntax, design paradigms, and packages, as well as a database model I’ve never used before it will take me a lot longer to implement what I initially planned, so I’ll try to start small. I’ll attempt to isolate each unknown and understand it before moving on to the next thing, which means I might start by getting Prisma to work with Postgres before trying to learn Mongo (which is still only in “experimental support” by Prisma, anyway).

TIL

Git submodules

I cloned this project on another machine, and nothing rendered when I ran the Hugo server. A bunch of errors showed up in the console like this:

WARN 2021/07/29 11:05:01 found no layout file for "HTML" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

I had never cloned a project utilizing Git submodules, and that was my issue. The theme I’m using is a submodule, and it hadn’t been initialized, so the code to parse and build my site didn’t even exist. After cloning a project with submodules I needed to run

1
2
$ git submodule init
$ git submodule update

This pulled in the files I needed from git and it was able to build successfully.