Skip to content

Instantly share code, notes, and snippets.

View HammzaHM's full-sized avatar
🔬

Hamza Hmem HammzaHM

🔬
View GitHub Profile
@HammzaHM
HammzaHM / external_ip_address.txt
Created May 23, 2021 08:59
How to find the external @ip of the current machine in nodeJS
const net = require('net');
const client = net.connect({port: 80, host:"google.com"}, () => {
console.log('MyIP='+client.localAddress);
console.log('MyPORT='+client.localPort);
});