chat/lib/chat_server/application.ex
2023-04-17 22:49:46 +03:00

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