Packages

Interfaces Elixir with C/C++ code in a user-friendly way! Based on Erlang-ports. Provides a few Mix-tasks to kickstart the development process.

Current section

Files

Jump to
cure lib cure_sup.ex
Raw

lib/cure_sup.ex

defmodule Cure.Supervisor do
use Supervisor
def start_link do
Supervisor.start_link(__MODULE__, :ok, [name: __MODULE__])
end
def start_child(program_name) when program_name |> is_binary do
Supervisor.start_child(__MODULE__, [program_name])
end
def init(:ok) do
children = [worker(Cure.Server, [])]
supervise(children, strategy: :simple_one_for_one)
end
end