Skip to content

Commit

Permalink
Update supervisor config in getting started guide (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
amclain authored Oct 30, 2023
1 parent 910d97e commit 0cdf1bd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions guides/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,13 @@ defmodule MyApp do
# ...

def start(_type, _args) do
import Supervisor.Spec, warn: false

# 1. Load the viewport configuration from config
main_viewport_config = Application.get_env(:my_app, :viewport)

# 2. Start the application with the viewport
children = [
# ...
supervisor(Scenic, [viewports: [main_viewport_config]]),
{Scenic, [main_viewport_config]},
]

Supervisor.start_link(children, strategy: :one_for_one)
Expand Down

0 comments on commit 0cdf1bd

Please sign in to comment.