I ran the example on ipfg github for node creation. Here is the code:
const node = await IPFS.create()
Then executing the code twice. Here is the output:
PS C:\d\code\js\ipat> node index.js
Swarm listening on /ip4/192.168.2.133/tcp/4002/ipfs/QmVxfGtbh95P1yiNVL9TmEm1tZm7SjcFbLo6UbG6SEfHJc
Swarm listening on /ip4/127.0.0.1/tcp/4002/ipfs/QmVx1fGtbh95P1yiNVL9TmEm1tZm7SjcFbLo6UbG6SEfHJc
Swarm listening on /ip4/127.0.0.1/tcp/4003/ws/ipfs/QmVxfGtbh95P1yiNVL9TmEm1tZm7SjcFbLo6UbG6SEfHJc
Swarm listening on /p2p-circuit/ipfs/QmVx1fGtbh95P1yiNVL9TmEm1tZm7SjcFbLo6UbG6SEfHJc
Swarm listening on /p2p-circuit/ip4/192.168.2.133/tcp/4002/ipfs/QmVx1fGtbh95P1yiNVL9TmEm1tZm7SjcFbLo6UbG6SEfHJc
Swarm listening on /p2p-circuit/ip4/127.0.0.1/tcp/4002/ipfs/QmVx1fGtbh95P1yiNVL9TmEm1tZm7SjcFbLo6UbG6SEfHJc
Swarm listening on /p2p-circuit/ip4/127.0.0.1/tcp/4003/ws/ipfs/QmVx1fGtbh95P1yiNVL9TmEm1tZm7SjcFbLo6UbG6SEfHJc
Version: 0.40.0
Added file: hello.txt QmP93Hjdi17SKyDgfipEhZsPrAYbZjP1kHCEHVxzfGEGuc
Added file contents : Hello World of Antique Trading
PS C:\d\code\js\ipat> node --version
v12.14.0
PS C:\d\code\js\ipat> node index.js
Swarm listening on /ip4/192.168.2.133/tcp/4002/ipfs/QmVx1fGtbh95P1yiNVL9TmEm1tZm7SjcFbLo6UbG6SEfHJc
Swarm listening on /ip4/127.0.0.1/tcp/4002/ipfs/QmVx1fGtbh95P1yiNVL9TmEm1tZm7SjcFbLo6UbG6SEfHJc
Swarm listening on /ip4/127.0.0.1/tcp/4003/ws/ipfs/QmVx1fGtbh95P1yiNVL9TmEm1tZm7SjcFbLo6UbG6SEfHJc
Swarm listening on /p2p-circuit/ipfs/QmVxfGtbh95P1yiNVL9TmEm1tZm7SjcFbLo6UbG6SEfHJc
Swarm listening on /p2p-circuit/ip4/192.168.2.133/tcp/4002/ipfs/QmVxfGtbh95P1yiNVL9TmEm1tZm7SjcFbLo6UbG6SEfHJc
Swarm listening on /p2p-circuit/ip4/127.0.0.1/tcp/4002/ipfs/QmVx1fGtbh95P1yiNVL9TmEm1tZm7SjcFbLo6UbG6SEfHJc
Swarm listening on /p2p-circuit/ip4/127.0.0.1/tcp/4003/ws/ipfs/QmVx1fGtbh95P1yiNVL9TmEm1tZm7SjcFbLo6UbG6SEfHJc
Version: 0.40.0
Added file: hello.txt QmP93Hjdi17SKyDgfipEhZsPrAYbZjP1kHCEHVxzfGEGuc
Added file contents : Hello World of Antique Trading
To my surprise, the node id from two executions is the same. Should the node id be randomly generated and not be the same?