Search⌘ K
AI Features

Create a New Project

Explore how to create a new Elixir application using the mix tool with the --sup flag to support OTP supervision trees. Learn to add Ecto dependencies and understand the role of supervision trees for process reliability in database applications.

Creating a new Elixir application

The first step is to create a new Elixir application with the mix tool. A new application needs a lot of boilerplate, but mix new does all the heavy lifting for us.

widget

Note that we added the --sup flag to mix new. This is because Ecto does all of its work in separate OTP processes. It needs to be part of a supervision tree to make sure that it starts up correctly and will be restarted if a process fails.

What is a supervision tree?

...