[英]iex- How to run an elixir project from outside the app folder
I have some situation, 我有情况
in which i need to run an elixir project, from outside the project file. 我需要从项目文件外部运行一个elixir项目。
ie 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
, 即我有一个文件夹
code/example-app
,其中包含该应用程序(带有mix.exs
和所有其他内容),我想从code
运行该应用code
,
without cd
-ing into example-app
. 不用
cd
进入example-app
。
Is there a way to do that ? 有没有办法做到这一点 ?
You can specify the location of the mix.exs
file using the MIX_EXS
environment variable. 您可以使用
MIX_EXS
环境变量指定mix.exs
文件的位置。
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. 只需注意,如果您尝试执行在项目内部或其依赖项之一中定义的任务,则它将无法正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.