June 2022
Intermediate to advanced
130 pages
2h 45m
English
As you begin to build projects in Elixir, you’ll begin to rely more and more on the work of others. One of the first working tools in Elixir was a good package manager. Let’s see how that works.
Each Elixir project has a configuration in a file called mix.exs. Open up mix.exs so we can poke around. You’ll see three functions. Start with the def project(...) function:
| | def project do |
| | [ |
| | app: :hello, |
| | version: "0.1.0", |
| | elixir: "~> 1.10", |
| | start_permanent: Mix.env() == :prod, |
| | deps: deps() |
| | ] |
| | end |
This function is the description of your project. It’s stored in a list called a Keyword list, made up of keys like :app and values like :hello. It has the name, version number, ...
Read now
Unlock full access