So I have an Application module which follows this layout:
defmodule Project.Application do
use Application
def start(_type, _args) do
children = [
randomchild1,
randomchild2,
{Project.runapp, "argument" }
]
opts = [strategy: :one_for_all, name: Project.Supervisor]
Supervisor.start_link(children, opts)
end
end
Now when i run this i use mix run --no-halt
and it runs perfectly.
I want to replace the "argument" with a value that I pass in the command line? I cannot figure out how do I add arguments to mix run --no-halt
.
All I want to do is pass a value to the start method and use it to define the child process.