Overwrite repo with local files

This commit is contained in:
2026-02-20 14:59:31 -06:00
commit 82d5829ff4
53 changed files with 2630 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
defmodule Backend.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 = [
BackendWeb.Telemetry,
Backend.Repo,
{DNSCluster, query: Application.get_env(:backend, :dns_cluster_query) || :ignore},
{Phoenix.PubSub, name: Backend.PubSub},
# Start a worker by calling: Backend.Worker.start_link(arg)
# {Backend.Worker, arg},
# Start to serve requests, typically the last entry
BackendWeb.Endpoint
]
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: Backend.Supervisor]
Supervisor.start_link(children, opts)
end
# Tell Phoenix to update the endpoint configuration
# whenever the application is updated.
@impl true
def config_change(changed, _new, removed) do
BackendWeb.Endpoint.config_change(changed, removed)
:ok
end
end
+5
View File
@@ -0,0 +1,5 @@
defmodule Backend.Repo do
use Ecto.Repo,
otp_app: :backend,
adapter: Ecto.Adapters.Postgres
end