Create Your Repo Module

Learn how to create the repository module for your app.

Next, we need to create our application’s repository module. We went through this process in detail before, but we’ll run through it again here.

Creating repo.ex file

Open a new file called lib/my_app/repo.ex and add the following:

Press + to interact
defmodule MyApp.Repo do
use Ecto.Repo,
otp_app: :my_app,
adapter: Ecto.Adapters.Postgres
end
...