blog.nagee.dev

lightweight project

Sometimes I want to just build something, and I don’t want my tools to get in the way. I want to get a website spinning in just 5 minutes, but I also want to set myself up for success.

I want something fast, cheap, and easy to iterate on. Fast means I can build and deploy it quickly, and it means that users experience it as fast. Nobody is waiting around for a bunch of JS to load before they can view the page. Cheap means it doesn’t cost me a lot to deploy it, and that if I upload it somewhere (as an image or a binary), I can stay on free tiers (lol).

Golang has become my tool of choice, with static content embedded into the binary and templ for HTML templating. Sqlite for the DB. I have a CI job that builds a binary and uploads it to a digital ocean space (basically DO’s s3), and and I have some deploy scripts that handle downloading and running the latest version of the binary. I don’t have any users, so the few seconds of downtime when I restart the service isn’t an issue.

I’m still new to golang. I’m not sure how easy it’s going to be to iterate on it. I’ve found architecting code a bit confusing and implicit interfaces to be a foreign concept, but I’m starting to get the hang of them.

So far, it’s been a good ride. I have my home page (src) and this blog (src) created using this approach. Creating a tool for scaffolding repos has also made things much faster.

Who knows how things will change, but so far I like this.