Jesse James
Jesse James

Reputation: 1223

What does ': :' mean?

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: enter image description here

When I wanted to see how my app looks like in browser, I couldn't open it even though I tried all of these:

  1. https://MyIPv4Address:443
  2. 127.0.0.1:443
  3. MyLink-LocalIPv6Address:443

Still I get nothing. That's why I asked you how can I possibly know which IP works.

Upvotes: 6

Views: 174

Answers (2)

ShrekOverflow
ShrekOverflow

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

Shotgun Ninja
Shotgun Ninja

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

Related Questions