Skip to content

Commit

Permalink
Remove unecessary comments, improve other relevant ones
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Sep 6, 2023
1 parent 1026720 commit 1dd43c8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 21 deletions.
6 changes: 0 additions & 6 deletions guides/directory_structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}
]
```

Expand Down
1 change: 0 additions & 1 deletion guides/mix_tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
11 changes: 4 additions & 7 deletions installer/templates/phx_single/lib/app_name/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1dd43c8

Please sign in to comment.