Create project

This commit is contained in:
2024-04-30 22:07:19 +02:00
commit 25293c298c
55 changed files with 2705 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
defmodule LoLAnalytics do
@moduledoc """
LoLAnalytics keeps the contexts that define your domain
and business logic.
Contexts are also responsible for managing your data, regardless
if it comes from the database, an external API or others.
"""
end
@@ -0,0 +1,20 @@
defmodule LoLAnalytics.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
@impl true
def start(_type, _args) do
children = [
LoLAnalytics.Repo,
{DNSCluster, query: Application.get_env(:lol_analytics, :dns_cluster_query) || :ignore},
{Phoenix.PubSub, name: LoLAnalytics.PubSub}
# Start a worker by calling: LoLAnalytics.Worker.start_link(arg)
# {LoLAnalytics.Worker, arg}
]
Supervisor.start_link(children, strategy: :one_for_one, name: LoLAnalytics.Supervisor)
end
end
@@ -0,0 +1,5 @@
defmodule LoLAnalytics.Repo do
use Ecto.Repo,
otp_app: :lol_analytics,
adapter: Ecto.Adapters.Postgres
end