Getting started with Erlang and Cowboy on Windows (rebar3 edition)

This is a follow-up to my previous post about Erlang and Cowboy, except this time covering it with the rebar3 build tool.

First, let me predicate this a little bit. rebar3 is a cool build tool, and I like it because it’s pure Erlang (no special build environment needed on Windows) and because it supports hex.pm, the new package index for Erlang and Elixir. As I come from a heavy Python background, I love Python’s PyPI, and having something similar in Erlang seems like The Way To Go™. However, if your goal is simply to get up with Erlang and Cowboy in the quickest way possible, read my other post. Cowboy is set up to work with Erlang.mk and will require less set up in that environment (especially the Cowboy-specific templates) compared to the rebar3 approach.

Also be aware that there seem to be some intermittent certificate errors with hex.pm’s package server which causes TLS-related errors and may prevent you from pulling from the package manager server via rebar3. Hopefully this will be resolved soon…

[…]

Getting started with Erlang and Cowboy on Windows (erlang.mk edition)

This is the first in a series of posts on getting up and running writing microservices using Erlang and Cowboy, for those of us who chose to (or are required to) develop in a Windows environment.

Of course, one could get snarky and say “Install VirtualBox – done.” But let’s be a little more polite to the Windows users here. Windows is a supported platform for Erlang, so I want to provide assistance for those who choose, or need to use, Erlang in this way.

Without further ado…

[…]

Simple tricks: “cyghere”: open Cygwin shell here

I’m sure there’s other solutions out there, but I’ll share mine. Create a directory on your system and add it to your path. In my case, I use C:\scripts. Create a script, cyghere.bat, as follows (assuming cygwin is installed to C:\cygwin): Now, you can launch a cygwin shell from basically any program that lets you Read more about Simple tricks: “cyghere”: open Cygwin shell here[…]