Building the API Layer

Our API layer will name the concepts of the GenServer and smooth out some of the rough edges. We’ll build a lightweight API that uses the GenServer module to do the following:

  • starts

  • calls

  • casts

Declaring the module and aliases

The first step is to do the typical imports we need. In /lib/mastery.ex, we’ll delete the default implementation and set up the aliases we need:

Get hands-on with 1200+ tech skills courses.