Working on multiple projects concurrently requires a reliable, flexible, and fast environment setup.

Moreover, installing each and every project dependency in developer’ machine, even though better performing, could be problematic in a number of ways (waste of time, security issues, multiple conflicting versions of the same dependency, …).

Following gist is an opinionated minimal setup for Node.js development with Redis, and MongoDB (or PostgreSQL, CouchDB, OrientDB, …) with essential development helpers like MailCatcher and Localtunnel.

The setup requires Docker Compose for running dependencies and Vagrant for spawning the actual development virtual machine running Ubuntu Server LTS.

Why Vagrant instead of Docker for running the actual code?

In early/heavy development stage, having an actual virtual machine is preferable over a container mainly due to the flexibility that a VM provides in addition to the similarity to non-containerized production environment, if that is the case.

Why a virtual machine in the first place?

The VM is very optional and considered mainly for experimentation and/or when dealing with particular requirements. Running code in developer’ machine is always preferable. The VM is here for the scenario where it is not possible and/or safe for direct usage.