Working with Environment Variables in Node.js

Working with environment variables is a great way to configure different aspects of your Node.js application. Many cloud hosts (Heroku, Azure, AWS,, etc.) and Node.js modules use environment variables. Hosts, for example, will set a PORT variable that specifies on which port the server should listen to properly work. Modules might have different behaviors (like logging) depending on the value of NODE_ENV variable. Here are some of my tricks… Read More

JS 💖 Hardware – Getting started with Nodebots and Johnny-Five

Getting started with hardware hacking can be quite intimidating for some folks. The world of electronics is completely foreign for most developers; additionally, it requires you to write C/C which is efficient but not everyone feels comfortable with. However, the Nodebots movement is a nice way to get started with hardware development using JavaScript. In this article, I want to guide you through some very basic things… Read More

Scan your projects for crossenv and other malicious npm packages

On August 1st, Oscar Bolmsten tweeted about how he found a malicious npm package called crossenv that scans for environment variables and POSTs them to a server. @kentcdodds Hi Kent, it looks like this npm package is stealing env variables on install, using your cross-env package as bait: — Oscar Bolmsten (@o_cee) August 1, 2017 This is particularly dangerous considering that you might have secret credentials… Read More

Building the IT Crowd Answering Machine with Twilio Functions and JavaScript

Picture of Roy from IT Crowd answering the phone

One of my favorite things from IT Crowd is their “Hello IT” machine. It’s the perfect solution for lazy people who are tired of answering the same IT support questions again and again. With Twilio Functions and the new Speech Recognition we can build our own version of this machine with just a few lines of code. If you are not familiar with the answering machine from IT… Read More

Writing a Node.js module in TypeScript

Decorative title image

One of the best things about Node.js is its massive module ecosystem. With bundlers like webpack we can leverage these even in the browser outside of Node.js. Let’s look at how we can build a module with TypeScript usable by both JavaScript developers and TypeScript developers. Before we get started make sure that you have Node.js installed – you should ideally have a version of 6.11 or higher…. Read More

Deploy .NET Core with Docker and

Image with .NET Core, Docker and Zeit logo

Bundling up your application into a Docker container has many benefits including making deployments really easy without being bound to a particular cloud host. In this post we will containerize a .NET Core application and deploy it using Docker. Setup Before we can get started we need a couple of dependencies installed. Make sure you have the latest .NET Core SDK installed. You can download the SDK for your operating… Read More

Phone Number Verification without Regular Expression

Having invalid data in your database can be a nightmare. Especially if you are intending to use the data to do things like sending important SMS to your users. A typical solution is to use /Regular Expressions/gi to make sure the value at least looks like a phone number, but that still doesn’t prevent someone from entering a fake number and supporting international numbers makes it even… Read More

How To Set Environment Variables

There are some things we just shouldn’t share with our code. These are often configuration values that depend on the environment such as debugging flags or access tokens for APIs like Twilio. Environment variables are a good solution and they are easy to consume in most languages. Environment Variables???? Environment variables, as the name suggests, are variables in your system that describe your environment. The most well known… Read More