Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 487
Jesse James Avatar asked May 07 '15 20:05

Jesse James


2 Answers

:: 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

like image 90
4 revs, 2 users 70% Avatar answered Nov 04 '22 03:11

4 revs, 2 users 70%


:: 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.

like image 28
Shotgun Ninja Avatar answered Nov 04 '22 03:11

Shotgun Ninja