Hosting a Node.js process on a non-default port on AWS Elastic Beanstalk

Written By Eric Ihli

Two things happen that make it difficult to run a Node.js process on a non-default port. First, Elastic Beanstalk uses load balancers. When a request hits your EB DNS (your-app.elasticbeanstalk.com) the load balancer directs the traffic to the least utilized instance (assuming you have multiple ec2 instances...

Read more

Overriding the 'verify' method on MiniTest::Mock

Written By Eric Ihli

Ran into an interesting problem today in which a method in one of my classes happened to have the same name as a method on my testing framework. I'm pasting a lot of code but highlighting the important details with comments. Contract require_relative './exceptions' require_relative './fulfillment_...

Read more

LiveReload Development with Django, Docker, Circus, and Chaussette

Written By Eric Ihli

UPDATE: I got it to work. Use inotify on your host machine to watch the directory for changes and run docker exec <container> circusctl restart <circus_process> And since MAC doesn't have inotify, we can use fswatch. brew install fswatch Then we can watch a directory...

Read more

'New' Keyword in JavaScript

Written By Eric Ihli

The new operator is often misunderstood and improperly used by programmers just learning JavaScript. This operator "creates an instance of a user-defined object type or of one of the built-in object types that has a constructor function". Let's focus on one part a a time. In the sentence...

Read more

How to check out a GitHub pull request locally

Written By Eric Ihli

A common git workflow is for developers to work on a feature branch of their local fork and then submit a pull request to the upstream master. The pull request is then reviewed by other members of the team and if everything looks good it's merged in. For simple pull...

Read more