A friend of mine, Justin Searls, recently released a project that he and his team have been working on for a while, to replace both sinon.js and the built-in jasminebdd mock / spy tooling. The project, TestDouble.js (apparently named after his company, TestDouble?) aims to provide a simplified, clean, yet powerful mock / stub / […]
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 […]
A lot of people think that Node has built-in singleton objects with the “require” function. This is far from the truth. The require function only creates a cached module instance that can easily be broken. So, what does it take to build a true singleton in Node.js?
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 […]
A WatchMeCode subscriber recently emailed a question regarding some code in my Variable Scope episode (part of the JS Fundamentals series). In her question, she points out some code from the episode, wondering if it is still considered an Immediately Invoking Function Expression (IIFE) or not. I watched the variable scope episode and you initially […]
At the Nodevember 2015 conference, I gave a talk titled “A Telegraph To The Future Of Web Apps”. This talk is very much the “why to” of human communication, messaging in software, and how software reflects the way we work together. The Nodevember conference had all of the talks recorded and there are a log of […]