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 few months ago, I stopped writing AJAX-style auto-complete inputs on my web apps. Instead, I started using the HTML5 DataList feature. It’s a pretty simple, and fairly slick way to do auto-complete on an input text box (as long as your list isn’t too long, since all items will be rendered into the HTML […]
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?
I’ve done a lot of work with ES6 in the last 6+ months, and I’ve found that while I do still have a lot of questions about some of the new features and syntax, there are some parts that a big win for everyone, right now. To illustrate the parts that I like best, I […]
A reader recently sent me an email, asking a question about how to find an item in an array, based on a property / attribute that would match. Meaning, the object instance will be different, but the attribute (such as “id”) will be the same. This person wanted to know if there’s a good way […]
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 […]