Start a Phoenix.PubSub instance
mainTo initialize Phoenix.PubSub, add it as a child to your application's supervision tree. You must provide a unique name for the PubSub instance.
defmodule MyApp do
use Application
def start(_type, _args) do
children = [
{Phoenix.PubSub, name: MyApp.PubSub}
]
opts = [strategy: :one_for_one, name: MyApp.Supervisor]
Supervisor.start_link(children, opts)
end
end