Skip to content

Instantly share code, notes, and snippets.

@mwgkgk
Last active April 19, 2023 03:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mwgkgk/e84536857b43b7f4db188c0e0a1f1478 to your computer and use it in GitHub Desktop.
Save mwgkgk/e84536857b43b7f4db188c0e0a1f1478 to your computer and use it in GitHub Desktop.
Connect two IEx nodes

tl;dr:

$ iex --sname server
$ iex --sname client
iex(client@localhost)> Node.connect :"server@localhost"

Start a named node:

$ iex --name any_name@any_domain

Short form (sets domain to localhost.localdomain):

$ iex --name any_name   

Short form (sets domain to localhost):

$ iex --sname any_name

Find out running node name:

iex> Node.self
:asdf@localhost

Connect to a node (mind the atom):

iex> Node.connect :"asdf@localhost"

List connected nodes (excluding current one):

iex> Node.list
[:asdf@localhost]

Erlang observer:

:observer.start

Connect to other nodes from observer:

`Nodes` -> `Connect node`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment