[英]iex: run compiled elixir binary in iex console
I have binary file compiled using mix release
: bin/app
.我有使用
mix release
编译的二进制文件: bin/app
。
How can I run it using iex
so that I will be attached to process console and will be able to call functions from bin/app
?如何使用
iex
运行它,以便连接到进程控制台并能够从bin/app
调用函数?
There are two ways:有两种方法:
bin/foo start_iex
iex
(for this the application should have been started named.)iex
连接到正在运行的远程(为此,应用程序应该已经命名。) Assuming the application was run as foo@192.168.1.42
, and local host is 192.168.1.10
, this would open a remote shell:假设应用程序以
foo@192.168.1.42
运行,本地主机为192.168.1.10
,这将打开一个远程 shell:
iex --name remote@192.168.1.10 \
--remsh foo@192.168.1.42 \
--cookie COOKIE
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.