Persisting the Responses

Let’s learn to set up our project to use Ecto and write some functions to save user responses.

We’ve done some tedious work to prepare our project to work with Ecto. Now, we need to deal with concurrency. As we saw in Customizing our Lifecycle, the nice thing is that we can deal with lifecycle concerns with policy configuration and not code.

Adding a repo for Ecto processes

We’ll open up /mastery_persistence/lib/mastery_persistence/application.ex and add these lines:

Get hands-on with 1200+ tech skills courses.