简体   繁体   English

iex:在 iex 控制台中运行编译的 elixir 二进制文件

[英]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
  • connect to the running remote from 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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM