Created
August 8, 2016 21:22
-
-
Save michelson/5f33be0fa702df5b3e8e2f3193cd8747 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule UploaderHandler 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 | |
IO.puts "iniciando" | |
children = [ | |
# Define workers and child supervisors to be supervised | |
# Plug.Adapters.Cowboy.child_spec(:http, AppRouter, [], [port: 4001]) | |
Plug.Adapters.Cowboy.child_spec(:http, AppRouter, [], [port: 4001]) | |
] | |
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html | |
# for other strategies and supported options | |
opts = [strategy: :one_for_one, name: UploaderHandler.Supervisor] | |
Supervisor.start_link(children, opts) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment