
Receiving a POST request is the “Hello, World” v2 of building a web app. Here’s how to receive a POST request with three popular Node.js frameworks – Express, Hapi, and Koa.
Let’s build an app that receives an inbound SMS webhook from Twilio. When a user texts your Twilio phone number, Twilio will make a POST request to the URL that you configure with all the bits of information you care about. Normally you’d want to reply with TwiML, but for simplicity we can reply with an SMS in plain text if we set the Content-Type
header as text/plain
.
What We’ll Need
- Node.js – follow the steps to install for your platform.
- A free Twilio account and phone number.
- Ngrok – download the binary for your p …

Did you know that Node.js has a built in debugger? I didn’t until a few months ago. Check out how it can make debugging your code a breeze.
To follow along at home you’ll need:
First let’s write some code to debug. We’re going to sum the contents of an array with a for
loop.
Paste the following into a file named index.js
.
'use strict'
const list = [1, 2]
let total = 0
for (let i = 0; i <= list.length; i++) {
total += list[i]
}
console.log(total)
Running this with node index.js
you’ll see NaN
printed out.
Instead of smashing our faces against the keyboard let’s run the file through the Node.js debugger by passing node
the debu …

What’s that? You want to add filters to your video application that serve no purpose other than looking awesome? Check out how easy adding CSS filters are to elements on your page.
In a recent post we saw how to introduce React.js into an existing Twilio Video application. Let’s pick up where we left off and add our video filters as a new React component.
Start by cloning this repo and moving into it:
git clone -b conversation-react-component git@github.com:eddiezane/react-twilio-video-post.git
cd react-twilio-video-post

Would you laugh if I told you that you could send an SMS message in 60 seconds with Java? Well stop what you’re doing and believe my friend.
Video: Sending an SMS in 60 seconds with Java
Play Along At Home
To get going on your own you’ll need a few things.
- A free Twilio account.
- A Twilio Phone Number.
- The Twilio Java Library.
If you need help setting things up I’ve got a great blog post for you.
Once you have the Twilio library downloaded, create a new file named HelloTwilio.java
with the following code and plug in your credentials and phone numbers.
Note the following snippet uses the updated version of the Java helper library.
// Install the Java helper library from twilio.com/ …

Node.js version 6.0.0 shipped yesterday and brings with it a ton of stellar ECMAScript 2015 features. Here are three that will make your life easier and are worth getting excited about.
Function Defaults
How many times have you written boilerplate code that looks something like this:
function beginTeleportation (who, options) {
options = options || {}
}
Well the days of checking for the existence of function arguments are over. Default function parameters let you define a default value for function arguments right in the function declaration.
function beginTeleportation (who, options = {}) {
}
In this example if options
isn’t passed in it will be assigned to a new …

One of the most challenging conversations in software development is debating the modernization of an existing application. In fact telling your boss that you want to rewrite something in a new technology may not always end well.
But with so many new and better frameworks like React being released every day, there are definitely times where it makes sense to bite the bullet and go green(field). Thanks to React’s focus on modular and reusable components, replacing existing pieces of your application with self contained React components actually makes modernizing a brownfield application much easier, even fun.
We’ll see how simple this is by taking the Twilio Video Quickstart and replacing the conversation piece of the application with a React component. If you want to skip to the end result you can grab the completed code from GitHub.
Tools
Before we get started we’ll need to install and gather the …

Not every customer that calls in for support is a happy camper. When an unhappy customer walks through the door there are a multitude of signs and signals as to how they are feeling. However, over the phone it can be more difficult to judge a customer’s emotions when all that’s expressed are words and tone. Wouldn’t it be great to have help identifying how a customer is feeling? In this post we’re going to do just that using a Cloud Foundry Java application and two Watson APIs inside IBM Bluemix along with Twilio Programmable Voice.
Our application will start with a Twilio phone number. When a customer calls the number Twilio will make an HTTP request to our Java app looking for some TwiML instructions in the app’s response. Our TwiML will ask the user why they are calling and then record their response. Once the recording is …

JavaScript has been my go-to language for quite some time now and before that it was Ruby. Both of these languages have a lovely dash of functional programming that I’ve toyed with here and there. It seems functional concepts are becoming more and more prominent amongst the JS community with projects like Redux and Immutable.js gaining popularity. I recently decided to take the dive into functional programming. A friend recommended the Clojure programming language and learning it has been a real hoot.
Clojure was created by Rich Hickey who had a very strong rationale for its birth. The language is designed to compile down to bytecode and run on a virtual machine so it’s not OS dependent. …

Many of the communities I’m active in have adopted Slack to communicate. Even though Slack has a really sweet web app, I still prefer to use the desktop client for a few reasons.
- Having a native app means that it’s always on without having to keep a browser tab open.
- You keep the ability to alt-tab to it.
- Native notifications – this includes the unread badge count on OS X.
Building a desktop application can be challenging because of the required platform specific knowledge. If the app you’re building needs to run on different platforms your knowledge requirements increase significantly due to the disparate environments.
This is where Electron teleports in to save the day. From the repo:
> The Electron framework lets you write cross-platform desktop applications using JavaScript, HTML and CSS. It is based on Node.js and Chromium and is used in the Atom editor.
As mentioned …

Writing asynchronous code is hard. When it comes to JavaScript we rely heavily on callback functions to accomplish asynchronous tasks which can be far from intuitive. This cognitive overhead creates a barrier to entry for newcomers to programming and the language and even causes frequent heartburn for those of us who have been using the language a while.
In this post we’ll examine how a proposal for ECMAScript 2016 (ES7) can be used to improve our experience with asynchronous programming in JavaScript, making our code easier to understand and simpler to write.
The World of Today
Let’s start by taking a look at an attempt of asynchronous programming today. The following example uses the request library to make an HTTP request to the Ron Swanson Quotes API and prints the response to the console. Give it a spin by pasting the following into a file named app.js
and running …