Skip to content

Instantly share code, notes, and snippets.

@jmsevold
Created February 13, 2016 02:34
Show Gist options
  • Save jmsevold/41efa0d1b7e4867d72e6 to your computer and use it in GitHub Desktop.
Save jmsevold/41efa0d1b7e4867d72e6 to your computer and use it in GitHub Desktop.
defmodule MyApp do
use Application
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
worker(Todo, [[]])
]
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: MyApp.Supervisor]
Supervisor.start_link(children, opts)
end
end
@danielberkompas
Copy link

@jmsevold can you post your Todo GenServer also?

@jofan
Copy link

jofan commented Feb 21, 2016

@jmsevold Could it be that you start your GenServer with "start" and not "start_link"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment