After ChatGPT flagged that mdserver might allow path traversal attacks, I used Bruno, an under-development Postman/Insomnia alternative, to check whether Express was sanitizing URLs properly. ChatGPT generated pass and fail URL examples, I wrote asserts for each in Bruno, and the whole collection can be run at once. A side benefit is that requests are stored as version-controllable text committed alongside the rest of the code...
This is a write-up of a small weekend project of mine: a Node.js/Express server that serves markdown files from a directory as HTML, using middleware to intercept requests for .md files and convert them with the Showdown library. I added a simple string-replacement template so the output is well-formed HTML with a proper page title. The code is on GitHub, with hardening and a possible Docker containerization left as future work...
After Insomnia forced account creation and my saved API requests disappeared, I switched to Bruno, a free and open-source API client available for Mac, Windows, and Linux, plus a CLI and VS Code plugins. Bruno stores request collections as human-readable text files, making them easy to commit to source control alongside code. The writeup includes my first impressions after an afternoon of use...
A step-by-step walkthrough of my routine for starting new Node/Express SSR web projects with HTMX, covering directory setup, npm and git initialization, GitHub repo creation, and my ongoing dilemma about committing htmx.min.js versus using a CDN. In the second half, I describe an Express starter skeleton with EJS views and partials, basic routing with 404 handling, and some starter CSS...
A small Go utility exposes a lightweight JSON endpoint on each node or VM indicating whether RAM and disk usage are okay. Uptime Kuma watches the endpoint with its HTTP keyword check and sends an ntfy push notification when a machine gets into trouble. I include brief impressions of writing in Go and link to the GitHub repo...
I walk through using VS Code’s Remote-SSH extension to edit files on a remote server with a full editor instead of terminal tools like nano or vim. I explain that the plugin works by installing VS Code Server on the remote machine and connecting over SSH, then I cover setup: installing the extension, adding a host via the Remote Explorer, saving the SSH config, and connecting in a new window...
After a couple of homelab incidents that Uptime Kuma didn’t catch, including a vanished USB mount and an NVMe drive filling up, I consider adding custom checks for things like disk space, memory use, and mount status via a small metrics endpoint. Weighing Node/Express against Python, C, and Golang, I conclude that C’s benchmark edge isn’t worth the hassle for endpoints polled only every few minutes...
While getting a web app ready for alpha testing with real user data, I needed to add login authentication. My post is mostly a recommendation for a video by Valentin Despa that explains the big picture of implementing authentication in an Express app with Passport, a gap left by more detailed tutorials...
I add authentication to an old Node.js app by cloning a four-year-old tutorial repo, which produces a flood of npm install errors. I explain how package.json and package-lock.json pin dependency versions (carets, tildes, exact pins, transitive dependencies), then work through escalating fixes in order of risk: deleting the lockfile, loosening version ranges, wildcard updates, and npm audit fix –force, followed by testing...
How I silence linter warnings that VS Code raises for the minified pico.min.css file from the Pico CSS library: I exclude the file with a files.exclude entry in .vscode/settings.json, which stops it appearing in the file view and being processed by extensions. I also cover committing workspace settings to the repository and leaving a note in .gitignore so the hidden file isn’t confusing later...
A walkthrough of deploying a Node.js app to a server so it runs as a systemd service rather than an attached terminal session. Using a minimal Express app as the example, I cover copying the files over, installing dependencies, writing a systemd unit file with restart behaviour, and confirming the app still responds after logging out. It’s my manual groundwork for a later Ansible playbook that will automate the setup...
I configure NGINX on a VPS to serve static files while forwarding /api routes to a Node.js app running on localhost. I cover a server block example with proxy_pass and the Host header, the conf.d include convention, and restarting or validating the config. This post is part of a series on my weather API, but it is self-contained...
Coming from a relational database background, I look at schema design for document-oriented NoSQL databases such as MongoDB, alongside how implementations handle updates to variable-size documents on disk, covering techniques like memory caching, journaling, delta writes, and periodic compaction. My practical conclusion is to design schemas around how the app accesses data and leave the low-level storage details to the database...
I deploy a small Node.js and Express service from my MacBook to an Ubuntu VPS, covering the choice between a native install and a Docker container, installing Node and npm via apt (including why the Ubuntu repository version is quite old), and copying project files to the server with scp rather than setting up git-based CI/CD for such a tiny project. I test with Insomnia instead of Postman, which I avoid because of its data collection...
In this beginner-level walkthrough, I move a static temperature text file from NGINX to a Node.js server. I introduce NGINX and reverse proxying, explain what Node and Express are, and show a short Express setup that serves the file on localhost port 3000, with deploying it left for later...
A short YouTube video on building REST APIs with Node and Express prompts a plan to replace my existing weather data setup—a Python cron job on a VPS that writes API results to a text file served by NGINX—with a Node.js endpoint that fetches and caches fresh weather data on request. This would cut the up-to-ten-minute staleness of temperature data polled by homelab servers, and I break the work into small steps, starting with replicating the current text-file behaviour in Node behind NGINX...
I set up SSL for a domain served by Nginx in Docker, using Let’s Encrypt certificates generated through Porkbun. I cover concatenating the certificate files, fixing a malformed PEM that broke Nginx startup, and migrating from a plain docker run command to a docker-compose setup with volume mounts and SSL config. I note that certificates expire after 90 days, with certbot suggested as a future automation fix...
Frustrated by the lack of cheap Australian VPS options compared to US providers, I tried Binary Lane, a low-priced developer-focused service from Australian host Mammoth. An Ubuntu server in Sydney was live within a minute of signing up, with Docker and a website running soon after. I also touch on the web panel, switching to SSH, and my plans to use the server for learning domains, SSL, and testing...
While trying to clear an npm audit vulnerability in my React app’s nth-check dependency, I investigate confusing version mismatches between package-lock.json and npm list, and find that hand-editing the lock file doesn’t survive an install. A GitHub issue on create-react-app explains the flag is effectively a false positive for a dev-only dependency and can be safely ignored, with a workaround for CI builds. My takeaways include a clearer understanding of package.json versus package-lock.json and the value of searching for the exact error first...
I run into repeated breakage in the Zero to Mastery Complete Web Developer course, where deprecated packages like particles.js and a legacy REST API leave the material non-functional out of the box. After spending several hours on a workaround, a required react-scripts downgrade leaves the dev server failing with errors, and I weigh the remaining options, from watching the content without following along to cloning the instructor’s repo...