iex: run compiled elixir binary in iex console

Viewed 208

I have binary file compiled using 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?

1 Answers

There are two ways:

  • bin/foo start_iex
  • connect to the running remote from iex (for this the application should have been started named.)

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:

iex --name remote@192.168.1.10 \
    --remsh foo@192.168.1.42 \
    --cookie COOKIE
Related