Search code examples
elixiraliasphoenix-frameworkecto

How to add aliases and imports into my own mix under umbrella application in Elixir?


I have an Umbrella application in Elixir.

It has 2 applications in it. One API controller and views, one only Database ( Ecto ) and everything goes with it.

I want to make my own mix file so I can put my aliases and imports in there. It gets very annoying in the iex when every time I have to import bucket load of alias and imports before I can test my codes.

I have already made a file with .iex.exs and put that under one of the applications root, no lock when I run iex -S mix

Here is the content of my mix file:

db.iex.exs

alias Db.{ Repo, Document }

Here is the folder structure:

enter image description here

Thanks guys


Solution

  • The file should be .iex.exs not db.iex.exs.