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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With