DesktopWindow Supervisor配下にPubSub用Supervisor と、Repo用Supervisorを置く defmodule Basic do @app Mix.Project.config()[:app] def config_dir(), do: Path.join([Desktop.OS.home(), ".config", "basic"]) def start(:normal, []) do {:ok, repo} = Supervisor.start_link([Basic.Repo], name: __MODULE__, strategy: :one_for_one) {:ok, _} = Supervisor.start_child(repo, BasicWeb.Sup) {:ok, _} = Supervisor.start_child(repo, {Desktop.Window, [ app: @app, id: BasicWindow, title: "BasicApp", size: {600, 500}, # icon: "icon.png", menubar: Basic.MenuBar, icon_menu: Basic.Menu, url: &BasicWeb.Endpoint.url/0] }) end end