I am trying to have two EndPoint in the phoenix app, but I get this error when starting the server:
** (Mix) Could not start application myapp: MayApp.start(:normal, []) returned an error: shutdown: failed to start child: MayApp.Schools.Endpoint
    ** (EXIT) shutdown: failed to start child: Phoenix.PubSub.PG2
        ** (EXIT) already started: #PID<0.393.0>
Here is the children supervisors,
children = [
      # Start the endpoint when the application starts
      supervisor(MayApp.Endpoint, []),
      
      # Start the endpoint for schools
      supervisor(MayApp.Schools.Endpoint, []),
      # Start the Ecto repository
      supervisor(MayApp.Repo, []),
      # Here you could define other workers and supervisors as children
      # worker(MayApp.SomeWorker, [], name: SomeWorker),
    ]
MayApp.Schools.Endpoint is a copy of MayApp.Endpoint only socket "/socket" is pointing to another module.
Any idea?




















