Hi,
I’ve declared the function in my file and called it in application.ex. The error I’m getting is saying start_link/2, however my function is start_link/0. How can I make my application file to take the function exact which is defined.
defmodule SatoriWebsockets.List do
use GenServer
def start_link() do
GenServer.start_link(__MODULE__, nil, name: __MODULE__)
end
Here’s the application.ex where I’m calling this function:
children = [
%{
id: Phoenix.PubSub,
start: {SatoriWebsockets.List, :start_link, [:index, []]}
},
# Start the Telemetry supervisor
SatoriWebsocketsWeb.Telemetry,
# Start the Endpoint (http/https)
SatoriWebsocketsWeb.Endpoint
]
Seeking Guidance.