:mnesia.create_schema([node()]) specify node name

hi, if i’m trying to set --name inside a elixir script, just like when i run iex --name command

$ iex --name nodename
 > :mnesia.create_schema([node()])
 > ^ctrl+c
$ ls

how do i specify --name inside a elixir script (a mix task) that run :mnesia.create_schema([node()])

because by default is Mnesia.nonode@nohost and it’s look bad

:net_kernel.start([:customname, :shortnames]) do the job

1 Like