O'Reilly logo

Programming Phoenix by Jose Valim, Bruce Tate, Chris McCord

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Umbrellas

Now that we’ve confirmed our intuition by using Observer, we can get down to the work of splitting these applications. Each umbrella project has a parent directory that defines:

  • The shared configuration of the project
  • The dependencies for that project
  • The apps directory with child applications

To get started, let’s create an umbrella project called rumbrella. Instead of using mix phoenix.new to build a Phoenix application, we’ll use mix new, which ships with Elixir, and pass it the --umbrella flag. Let’s run the command outside of the rumbl application, like this:

 $ ​​mix​​ ​​new​​ ​​rumbrella​​ ​​--umbrella
 
 * creating .gitignore
 * creating README.md
 * creating mix.exs
 * creating apps
 * creating config
 * creating config/config.exs ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required