I have some situation,
in which i need to run an elixir project, from outside the project file.
i.e. i have a folder code/example-app
that contains the app (with the mix.exs
and all the rest)
and i would like to run that app from code
,
without cd
-ing into example-app
.
Is there a way to do that ?
Asked
Active
Viewed 5,937 times
3

fay
- 2,086
- 2
- 14
- 36
1 Answers
4
You can specify the location of the mix.exs
file using the MIX_EXS
environment variable.
MIX_EXS=./code/example-app/mix.exs mix deps.get
You can read more about the environment variables that affect mix in the documentation.
Just note that if you try to execute a task that is defined inside of the project or one of its dependencies, it will not work.

Justin Wood
- 9,941
- 2
- 33
- 46