Reputation: 1223
I wanted to log the ip of my node.js server to the console so I added:
console.log( server.address().address )
to my server code. I got this in return:
::
Does it mean that my server ip is not set? And if so, how can I set it?
EDIT 1; Here's the issue guys, when I compile my server file with Node, I get the following:
When I wanted to see how my app looks like in browser, I couldn't open it even though I tried all of these:
Still I get nothing. That's why I asked you how can I possibly know which IP works.
Upvotes: 6
Views: 174
Reputation: 6916
::
is equivalent to the IPv6 address 0:0:0:0:0:0:0:0
as pointed out by @nwellnhof in this comment
You can read more about IPv6 here
Upvotes: 8
Reputation: 2540
::
on its own is equivalent to the "unspecified" IPv6 address 0:0:0:0:0:0:0:0
.
In fact, any occurrence of ::
in an IPv6 address indicates a replacement with a string of 0-valued segments; ie. fe80::101d
is shorthand for fe80:0:0:0:0:0:0:101d
.
Upvotes: 5