 	@behavior :supervisor
 
 	def start_link() do
-		Erlang.supervisor.start_link({:local, :elixir_cowboy_sup}, :elixir_cowboy_sup, [])
+		Supervisor.start_link({:local, :elixir_cowboy_sup}, :elixir_cowboy_sup, [])
 	end
 
 	def init([]) do

	@behavior :application

	def start() do
		Erlang.application.start(:cowboy)
		Erlang.application.start(:elixir_cowboy)		
	end

	def start(_type, _args) do
		dispatch = [
			{:'_', [{:'_', :elixir_cowboy_handler, []}]}
		] 
		Erlang.cowboy.start_listener(:my_http_listener, 100,
			:cowboy_tcp_transport, [{:port, 8080}],
			:cowboy_http_protocol, [{:dispatch, dispatch}]
		)
	end


	end

	def handle(req, state) do
		{:ok, req2} = :cowboy_req.reply(200, [], "Hello world!", req)
		{:ok, req2, state}
	end

