I have this raspberryPi with Node.JS running on top of it. By calling os.hostname(), the Pi returns "raspberry". I'm aware on how to modify this behaviour. What I don't know is how to do so in order to have it return an IP.
The raspberry is connected in a distributed application in which I use remote procedure call to execute functions. To be reachable, the Pi needs to have an address, but I'm not entirely sure on how to do this.
Thanks!
Try to return the first IP address for eth0
or