I have compiled my Erlang application by using basho rebar which makes an stand-alone escript executable file. I run it from command line like: ./myapp myconfig.config
My questio is that how can I determine the Erlang node name that run my application. When in my application I run 'node()' command, it returns by default "nonode@nohost" but I want to give my name to that node (e.g. mynode@domain.com), so when I run 'node()' in my application, I like to see 'mynode@domain.com' instead of 'nonode@nohost'
I know about "erlang -name 'mynode@domain.com'" but please consider I run the application from command line. I think an Erlang VM is run and terminate during the application life-time automatically.