I recently had a conversation in the WatchMeCode slack where someone was asking about the order in which various parts of Express middleware would fire. After some initial thoughts on the question, I found myself not 100% certain of the order between calls to “.use”, vs get/post/etc. So I whipped up a quick demo app […]
I recently found myself needing to support an unknown URL folder structure with an Express router. The gist of it is that I am serving video files that may or may not be in a sub-folder, from another service. And after some digging, I found there are at least three ways to make this work – most of which involve copy & paste programming.
A reader of my RabbitMQ Patterns email course recently asked a question about using messaging systems within an web application. Specifically, they wanted to know why you would use a request/reply pattern over a messaging server, instead of just handling the request within the HTTP call and the web server, itself. The short answer is, […]
Webhooks are a great way to add integration with external services and systems. I’ve used webhooks from Stripe, Dropbox and other systems to tell my app when something happens on the external service, making it easy for my system to respond to whatever the event was. While webhooks are generally easy to handle, there are […]
Express is one of the most flexible web hosting libraries I have used in my career. I love how simple it can be, and how it allows you to grow your system as needed. One of the areas that has continued to bother me in my own code, though, is my lack of ability to […]
It started as a question about what editor to use, and a desire to find a modern editor with code folding. But since then, the conversation has turned into a discussion on the realization that the “old” way we built large-scale software in .NET, Java and other “enterprise” languages, may not be so “old” after all.
A WatchMeCode subscriber recently asked a question about error handlers with Node and Express. In his scenario, the subscriber wants to have a series of routers to handle requests to /api. Within these routes, he wants a generalized error handler that will return the error as a JSON document instead of rendering an HTML page […]
In my RabbitMQ Patterns For Applications (email course / ebook), I talk about how you should limit the amount of time allowed for a Request/Reply scenario: The typical use case for a request/response scenario is to retrieve data that a user needs to see, from some external system. When the request is made, a reasonable […]
Code organization – both the code in a file, as well as the way the files are organized – is an important aspect of maintenance. It’s no surprise, then, that larger frameworks have very strong opinions on the subject. Unfortunately, though, many smaller frameworks and libraries lack this organizational guidance. This doesn’t mean we should ignore […]