# Application isn't started

**URL:** <https://forum.elixirforum.com/t/application-isnt-started/45340>\
**Category:** Questions\
**Tags:** agent, code-gnome\
**Created:** [January 18, 2022, 5:50pm UTC](https://forum.elixirforum.com/t/application-isnt-started/45340 "2022-01-18T17:50:52Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![joaoevangelista](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/joaoevangelista/32/39742_2.png) [@joaoevangelista](https://forum.elixirforum.com/u/joaoevangelista)\
**Post date:** [January 19, 2022, 3:08pm UTC](https://forum.elixirforum.com/t/application-isnt-started/45340/10 "2022-01-19T15:08:34Z")

</div>

You will also need to start a Supervisor on the start/2 callback instead of directly starting your Agent server, as per documentation:

> The [`start/2`](https://hexdocs.pm/elixir/Application.html#c:start/2) callback has to spawn and link a supervisor and return `{:ok, pid}` or `{:ok, pid, state}` , where `pid` is the PID of the supervisor, and `state` is an optional application state. `args` is the second element of the tuple given to the `:mod` option.

eg:

```elixir
defmodule Dictionary.Runtime.Application do

  use Application

  def start(_type, _args) do
    children = [{Dictionary.Runtime.Server, []}]
    Supervisor.start_link(children, strategy: :one_for_one)
  end
end

```

And I think you will need to provide a `start_link/1`

> [@romenigld](#):
>
> don’t need an initial value on the Server.start\_link

or you could implement your own [child\_spec](https://hexdocs.pm/elixir/Supervisor.html#child_spec/2) instead of relying on the convention of `{mod, args}` tuple as presented on the variable `children`

---

_[View the full topic](https://forum.elixirforum.com/t/application-isnt-started/45340)._
