April 2018
Beginner to intermediate
406 pages
9h 33m
English
This gives us all of the supporting code that we need to be able to work with this, so let's add an entry into our application's list of workers and applications to make sure that our table is created when the application is started and is ready to go! Open up lib/vocial/application.ex, and in the start/2 function, we'll add a new entry to the list of children:
# Define workers and child supervisors to be supervised children = [ # Start the Ecto repository supervisor(Vocial.Repo, []), # Start the endpoint when the application starts supervisor(VocialWeb.Endpoint, []), # Start your own worker by calling: Vocial.Worker.start_link(arg1, arg2, arg3) # worker(Vocial.Worker, [arg1, arg2, arg3]), supervisor(VocialWeb.Presence, ...