Category: web dev

  • Fancier Website in a Docker Container

    The previous post went over how to bundle a static website into a Docker container. That’s a neat little trick – keeping the entire website and making it trivial to install on a VPS behind Nginx Proxy Manager. It worked great for most of my little websites. But… A couple of my websites had very…

  • Website in a Docker Container

    Having figured out how to use the GitHub package registry, I was a bit inspired by this blog post from Florin Lipan to deliver all my little static websites as Docker containers. I’m not as focused as he is about making them tiny, but I did steal the idea of using BusyBox httpd for serving…

  • npm ERR! Exit handler never called!

    I quite like GitHub scanning all my code and sending me security advisories. Here’s today’s: With these, and my dependabot alerts, fixing them is usually just a matter of pulling down the project, running an npm update, building any artifacts, then pushing it back up. But today, not so: package-lock.json It’s probably worth revisiting what…

  • Code reuse by publishing to NPM

    If you find yourself copying over a source file from one Node project to another because it’s a handy utility you wrote and are used to using, you’re only doing it half right. A better way to do this is to publish your utility to the Node Package Manager (NPM). That way you can just…

  • Uploading files to a web app with Node

    My default approach to web apps at the moment is Node/Express SSR. I needed to have users be able to upload files this week, and as usual there’s an express middleware that makes it trivial. This post just steps through using multer to make it simple to enable file uploads on your website. Express &…

  • Authentication basics for Node apps

    Pretty much every serious web app needs to include a way for users to log in securely and to be served their content. Since there’s a lot of complexity in this, it’s highly advisable to use good libraries to support this. In a future post we’re going to use those libraries, but first I want…

  • Using LLMs for coding

    This post looks at the context for some of my thinking about AI for supporting software development, and where I’ve landed on it for the time being. The landscape I briefly wrote about ChatGPT’s coding ability at the end of 2022. The wide availability of this tool marked the beginning of what I think can…

  • Peek inside a Docker image

    A ‘dockerfile’ contains all the instructions to build a Docker image. Here’s my first draft for a project I’m working on: COPY . . is copying all of the files in my project into the working directory of the image so they can be run. Of course we don’t need them all for the app…

  • NGINX Proxy Manager

    I’ve mentioned using NGINX as an interface between the internet and a service a while ago. This works by all incoming traffic coming to NGINX, and NGINX determining which service that traffic should go (from the NGINX config files) then acting as a middleman. This functionality is generally referred to as a ‘reverse proxy’. This…

  • Deploying a Node app in Docker

    When I wrote the install instructions for mdserver (little Markdown server Node app) on it’s github page it was something like: Which is great if you know how to do those things (they are bread and butter to a web dev) but not if you’re a self-hoster who just wants a web server that converts…