chat/lib/chat_server/application.ex

20 lines
360 B
Elixir
Raw Normal View History

2023-04-17 19:49:46 +00:00
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