In one directory
iex --sname one
In another directory
iex --sname two
In IEx one
Node.connect :"two@COMPUTER_NAME"
Node.list
In IEx two
Node.list
List the files of the working directory of the other Node
fun = fn -> IO.puts(Enum.join(File.ls!, ",")) end
Node.spawn(:"one@COMPUTER_NAME", fun)
Node.spawn(:"two@COMPUTER_NAME", fun)
For Nodes in different machines start IEx with full name and a common secret cookie
iex --name one@DOMAIN_OR_IP --cookie SECRET_COOKIE
iex --name two@DOMAIN_OR_IP --cookie SECRET_COOKIE