20 lines
360 B
Elixir
20 lines
360 B
Elixir
defmodule ChatServer.Application do
|
|
use Application
|
|
require Logger
|
|
|
|
def start(_type, _args) do
|
|
Logger.info("Start application")
|
|
|
|
children = [
|
|
{ChatServer, []}
|
|
]
|
|
|
|
opts = [strategy: :one_for_one, name: ChatServer.Supervisor]
|
|
Supervisor.start_link(children, opts)
|
|
|
|
ChatServer.start_listening(8080)
|
|
|
|
{:ok, self()}
|
|
end
|
|
end
|