NodeJS
Patching npm Modules
Sometimes it is helpful to patch an npm module. It could be the case that you need to make a simple fix and you don’t want to maintain a fork of the library. The library may have a pull request to fix the issue but you don’t want to use an unmerged branch. For those…
Read MoreFetching a File in NodeJS with Request and Parsing It with Readline
Recently, I was working on a project where I needed to fetch a file from the internet and parse it line by line. NodeJS has the readline module that can be used to split a data stream into lines and perform a function on each line, which was perfect for my needs. The problem is…
Read MoreAutomatically Creating Github Issues Using Webtask.io
I am the co-organizer of the BeerJS meetings for TahoeJS. BeerJS is a casual meetup for JavaScript developers that has chapters all over the world. Our meetup is largely organized using a Github repo. As co-organizer, one of my monthly tasks is to create a Github issue for the upcoming meeting. The issue announces the…
Read MoreHandling the “possible EventEmitter memory leak detected” Error in React Native
The project that I’m working on is an e-commerce app for an online retailer, Build.com, built using React Native. React Native is a JavaScript framework that allows you to build cross-platform mobile apps in JavaScript that have near-native performance. While we use Redux to handle the state of our app and its data, occasionally we…
Read MorePreparing Your Angular 1 Code For Angular 2 (Part 2)
This post is Part 2 of a series of blog posts where I’ll convert an Angular 1.x project to Angular 2. In Part 1, I upgraded the Angular client to use the latest guidelines in the John Papa Angular Style Guide. Node.js has improved by leaps and bounds since I first wrote the Phone Cat…
Read MoreTesting NodeJS with Mocha and Chai
Last weekend, I worked on a coding challenge that involved writing two NodeJS servers with unit tests. The NodeJS portion of the project was pretty straightforward. One server generates random arithmetic problems and POSTs them to the other server. The second server accepts the POST, parses the equation, solves it, and responds with the answer.…
Read More