thanks for the response, this seems to work now:
defmodule Backend.Application do
@moduledoc false
use Application
def start(_type, _args) do
children = [
Plug.Adapters.Cowboy.child_spec(scheme: :http, plug: Backend.Router, options: [port: 8085]),
Mariaex.child_spec(hostname: "localhost", port: "3307", username: "removed", password: "removed", database: "removed")
]
IO.puts("Worker started on port 8085")
opts = [strategy: :one_for_one, name: Backend.Supervisor]
Supervisor.start_link(children, opts)
end
end
i had called the Maria.start_link() function above the line use Application, which in hindsight seems like a very obvious and careless mistake now on my part
i’ve tried to write this in the way you said, i assume this is what you meant by “supervision tree”?






















