Read about it on my blog
This app constists out of a CLI interface written in Go and a PostgreSQL database to store the items.
The following technologies where used:
First build/pull the container image using Nix
nix build .#postgresLoad the image into Docker/Podman. In Nushell this looks like
open result | podman loador in Bash
podman load < resultStart the database using the justfile. This will first start the conainer and will then use Atlas to apply the schema to the database.
just postgresThe database schema is managed with Atlas and can be viewed in schema.hcl.
There is only a one table with the columns: id, completed and name
To directly interact with the database run the command bellow.
The password for the postgres user is admin. (You can exit psql with ctrl+D)
just psqlTo build the Go app
nix buildRun it with
./result/bin/go-todo-mvpAtlas and psql generate files in the home directory. Clean them up using
just clean-global
See the justfile other commonly used commands.