This is used to determine the value of the node on which the process needs to run. Since distributed programming is used to run functions on different nodes, this function comes into good use when wanting to run programs on different machines.
This returns the name of the local node. nonode@nohost is returned if the node is not distributed.
-module(helloworld). -export([start/0]). start() -> io:fwrite("~p",[node()]).
When we run the above program, we will get the following result.