Julia Jacobs recently asked a question in the WatchMeCode community slack, about some asynchronous code she wanted to clean up. In this question, she wanted to know of good options for restructuring deeply nested promises without introducing any new libraries. Would it be possible to clean up the code and only use ES6 features? It’s a common […]
Some recent discussion in the WatchMeCode slack spawned a bit of research into creating custom errors through factory methods, while keeping the stack trace for those errors clean, in Node.js After a bit of digging, I found a good solution using Node’s Error.captureStackTrace method, and recorded a quick screencast to highlight it’s use. The Screencast […]
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.
It’s no secret that I’m a fan of various ES6 features. I use a lot of the new syntax options and methods on various objects whenever I can – in browser based apps as well as node.js apps. But I recently stumbled upon on a situation that had me wondering if the barrier to entry is really worth the cost, right now.
I’ve got some code running for the WatchMeCode media service that pulls a list of files from my AWS S3 bucket, and populates a database. The code has been working fine for a while now, but I recently wanted to add a sub-folder… and my code that reads the file list suddenly didn’t find the […]
Using a module that’s hosted in npm or on github is fairly easy. You can “npm install” or just update your package.json file with the github location and be done. But what about developing locally? How do you get your code from a module that you are building, into a project that needs it, without […]
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, […]