I am beginner in elixir. I am working on api . It is run directly from mix by using command iex -S mix
. This app includes chat_server and api server. It has seperate mix.exs
file.
I also need to create website for login/logout functionality for session handling in backend. I am using phoenix for that. Is has it command to start the server mix phoenix.server
They both has common database and modules.
So, I am thinking to run these two together from single mix file.
Should i create different mix.exs
for web server and handle them two different apps or is it possible to run from single mix.exs
file.
what if one app crashes?
Is it possible to define multiple apps inside this block?
def application do
# Specify extra applications you'll use from Erlang/Elixir
[
mod: { MYAPP, [] },
extra_applications: [
:logger,
:gproc,
:mongodb_ecto,
:ecto,
:ecto_mnesia,
:comeonin,
:bamboo,
:bamboo_smtp,
:phoenix,
:phoenix_html,
:cowboy,
:gettext
]
]
end