Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When should I generate a mix umbrella vs a phoenix umbrella?

I'm not sure when to use mix and when to use phoenix for creating umbrella applications.

I have read a lot of articles online but they are not clear of the reasoning for using mix over phoenix and vis versa.

mix gives:

- apps/
- config/

phoenix gives:

- build/dev/(consolidated/lib)
- apps/(app_name/app_name_web)
- config/(configs for different envs)
- deps/(stuffffff)

mix new [UMBRELLA NAME] --umbrella VS mix phx.new [UMBRELLA NAME] --umbrella

If I want to generate an umbrella that has an application that will serve html/json, how should I look at these commands?

like image 256
Loading... Avatar asked May 31 '19 15:05

Loading...


1 Answers

At the end of the day, they are both the same thing. The difference is that Phoenix already generates an umbrella with two applications, one for your domain and another for the web, and if you ran mix new you would have to assemble everything by hand. So if you are building a web application, use Phoenix, because it will give you a head start on setting everything up.

like image 95
José Valim Avatar answered Sep 18 '22 18:09

José Valim