Greetings all,
First time posting to this group...
I've done a decent amount of searching both on the web and within the
archives of this group but can't seem to find a definitive answer to my
question.
I'm working with a 3rd party API that requires me to pass them the IP
address of the server making the request. Is there a standard way to get my
servers's IP address?
I'm looking for the equivalent of PHP's global $_SERVER['SERVER_ADDR'].
I'm aware of require('os').connectionInterfaces(), but by what logic would
I be ensured to find the IP address?
For example, would I always look at the the 'en0' or 'en1' keys? Where
family is 'IPv4' and 'internal' is false?
Note that there is no other server in front of the node app.
Thanks for any help.
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en