Blog and Personal Website
Tech | Stack |
---|---|
Htmx | Frontend |
Ocaml & Reason | Backend |
Turso w/ Go | Database |
The nix flake has two build targets:
- dune project derivation: produces a binary that one can run as is
- docker image: produces a minimal image that contains the derivation
The derivation can be built with nix build
and the image can be built with
nix build .#docker
.
You can run it easily (assuming you have docker setup) with make run
. If you
want to clean up afterwards, use make clean
.
It uses Ocaml for the webserver and Reason for templating. I opted to use Turso for the DB but the client support for Ocaml is poor. So, I compiled Go to C and use Dune to bind the C code to Ocaml...probably not the best idea but it does work. Nix is used to build the code and with GitHub workflows, it gets deployed. Locally, I test using the Makefile. This will let you easily run and clean.