Skip to Main Content
Programming Phoenix
book

Programming Phoenix

by Chris McCord, Bruce Tate, Jose Valim
April 2016
Beginner to intermediate content levelBeginner to intermediate
300 pages
6h 58m
English
Pragmatic Bookshelf
Content preview from Programming Phoenix

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming Elm

Programming Elm

Jeremy Fairbank
Real-Time Phoenix

Real-Time Phoenix

Stephen Bussey

Publisher Resources

ISBN: 9781680501926Errata Page