April 2019
Beginner to intermediate
244 pages
6h 34m
English
The next step is to add the packages that Ecto needs to run. Open the mix.exs file and look for the deps/0 function. It should look something like this:
| | defp deps do |
| | [ |
| | # {:dep_from_hexpm, "~> 0.3.0"}, |
| | # {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", |
| | # tag: "0.1.0"} |
| | ] |
| | end |
Replace the commented-out code with the following:
| | defp deps do |
| | [ |
| | {:postgrex, ">= 0.0.0"}, |
| | {:ecto_sql, "~> 3.0"} |
| | ] |
| | end |
Postgrex is the driver Ecto uses to communicate with the PostgreSQL database. Ecto also supports MySQL and MariaDB out of the box with the mariaex adapter—you just need to replace ...
Read now
Unlock full access