Manage Dependencies

Let’s take a look at the files starting with mix.exs.

We'll cover the following...

mix.exs

Any project’s mix.exs file has two main functions: defining a project’s metadata and managing its dependencies. Of the two, dependency management is by far the most common thing developers do, and it’s the most important for our purposes as well.

Three functions defined in mix.exs do all the work for us. The project/0 function returns a keyword list of metadata about the application:

Press + to interact
def project do
[
app: :islands_engine,
version: "0.1.0",
elixir: "~> 1.5",
start_permanent: Mix.env == :prod,
deps: deps()
]
end

The app name, version number, and Elixir version are pretty self-explanatory. start_permanent: starts the system in such a way that the BEAM will crash if the top-level supervisor crashes. This will be true for the production environment as well.

The deps: key holds a list of build-time dependencies on which this application depends. The value ...