Current section
Files
Jump to
Current section
Files
templates/new_example/lib/app.ex.eex
defmodule <%= @mod %> do
@moduledoc """
Starter application using the Scenic framework.
"""
def start(_type, _args) do
import Supervisor.Spec, warn: false
# load the viewport configuration from config
main_viewport_config = Application.get_env(:<%= @app %>, :viewport)
# start the application with the viewport
children = [
supervisor(<%= @mod %>.Sensor.Supervisor, []),
supervisor(Scenic, viewports: [main_viewport_config])
]
Supervisor.start_link(children, strategy: :one_for_one)
end
end