I’ve made a behaviour that helps write faster many named GenServers. Like named: __MODULE__
.
It’s a behaviour module for starting supervised GenServer that is named as __MODULE__
by default or you can supply different name.
With the use of NamedSupervisedServer
, you can avoid the need to add c:start_link/1
function with name: __MODULE__
to your module every time you write a new one. If you need your own c:start_link/1
function, you can override it.
PS. If you use Docker with Elixir, please try Nbpm package. It frees you from having to deal with EPMD.