diff --git a/guides/directory_structure.md b/guides/directory_structure.md index 7a862f3bbe..70b4146ced 100644 --- a/guides/directory_structure.md +++ b/guides/directory_structure.md @@ -49,16 +49,10 @@ The `lib/hello/application.ex` file defines an Elixir application named `Hello.A ```elixir children = [ - # Start the Telemetry supervisor HelloWeb.Telemetry, - # Start the Ecto repository Hello.Repo, - # Start the PubSub system {Phoenix.PubSub, name: Hello.PubSub}, - # Start the Endpoint (http/https) HelloWeb.Endpoint - # Start a worker by calling: Hello.Worker.start_link(arg) - # {Hello.Worker, arg} ] ``` diff --git a/guides/mix_tasks.md b/guides/mix_tasks.md index 16035a6733..adfe02e52d 100644 --- a/guides/mix_tasks.md +++ b/guides/mix_tasks.md @@ -599,7 +599,6 @@ We certainly should follow the instructions and add our new repo to our supervis ```elixir . . . children = [ - # Start the Ecto repository Hello.Repo, # Our custom repo OurCustom.Repo, diff --git a/installer/templates/phx_single/lib/app_name/application.ex b/installer/templates/phx_single/lib/app_name/application.ex index 79c18688c9..8373d2a7a3 100644 --- a/installer/templates/phx_single/lib/app_name/application.ex +++ b/installer/templates/phx_single/lib/app_name/application.ex @@ -8,18 +8,15 @@ defmodule <%= @app_module %>.Application do @impl true def start(_type, _args) do children = [ - # Start the Telemetry supervisor <%= @web_namespace %>.Telemetry,<%= if @ecto do %> - # Start the Ecto repository <%= @app_module %>.Repo,<% end %> - # Start the PubSub system {Phoenix.PubSub, name: <%= @app_module %>.PubSub},<%= if @mailer do %> - # Start Finch + # Start the Finch HTTP client for sending emails {Finch, name: <%= @app_module %>.Finch},<% end %> - # Start the Endpoint (http/https) - <%= @endpoint_module %> # Start a worker by calling: <%= @app_module %>.Worker.start_link(arg) - # {<%= @app_module %>.Worker, arg} + # {<%= @app_module %>.Worker, arg}, + # Start to serve requests, typically the last entry + <%= @endpoint_module %> ] # See https://hexdocs.pm/elixir/Supervisor.html diff --git a/installer/templates/phx_umbrella/apps/app_name/lib/app_name/application.ex b/installer/templates/phx_umbrella/apps/app_name/lib/app_name/application.ex index 97fe8172c3..4f526f22a5 100644 --- a/installer/templates/phx_umbrella/apps/app_name/lib/app_name/application.ex +++ b/installer/templates/phx_umbrella/apps/app_name/lib/app_name/application.ex @@ -8,11 +8,9 @@ defmodule <%= @app_module %>.Application do @impl true def start(_type, _args) do children = [<%= if @ecto do %> - # Start the Ecto repository <%= @app_module %>.Repo,<% end %> - # Start the PubSub system {Phoenix.PubSub, name: <%= @app_module %>.PubSub}<%= if @mailer do %>, - # Start Finch + # Start the Finch HTTP client for sending emails {Finch, name: <%= @app_module %>.Finch}<% end %> # Start a worker by calling: <%= @app_module %>.Worker.start_link(arg) # {<%= @app_module %>.Worker, arg} diff --git a/installer/templates/phx_umbrella/apps/app_name_web/lib/app_name/application.ex b/installer/templates/phx_umbrella/apps/app_name_web/lib/app_name/application.ex index 98a1d6d1c7..2a4d0a08a3 100644 --- a/installer/templates/phx_umbrella/apps/app_name_web/lib/app_name/application.ex +++ b/installer/templates/phx_umbrella/apps/app_name_web/lib/app_name/application.ex @@ -8,12 +8,11 @@ defmodule <%= @web_namespace %>.Application do @impl true def start(_type, _args) do children = [ - # Start the Telemetry supervisor <%= @web_namespace %>.Telemetry, - # Start the Endpoint (http/https) - <%= @endpoint_module %> # Start a worker by calling: <%= @web_namespace %>.Worker.start_link(arg) - # {<%= @web_namespace %>.Worker, arg} + # {<%= @web_namespace %>.Worker, arg}, + # Start to serve requests, typically the last entry + <%= @endpoint_module %> ] # See https://hexdocs.pm/elixir/Supervisor.html