You will also need to start a Supervisor on the start/2 callback instead of directly starting your Agent server, as per documentation:
The
start/2callback has to spawn and link a supervisor and return{:ok, pid}or{:ok, pid, state}, wherepidis the PID of the supervisor, andstateis an optional application state.argsis the second element of the tuple given to the:modoption.
eg:
defmodule Dictionary.Runtime.Application do
use Application
def start(_type, _args) do
children = [{Dictionary.Runtime.Server, []}]
Supervisor.start_link(children, strategy: :one_for_one)
end
end
And I think you will need to provide a start_link/1
or you could implement your own child_spec instead of relying on the convention of {mod, args} tuple as presented on the variable children


















