📅  最后修改于: 2022-03-11 14:56:38.934000             🧑  作者: Mango
var http = require('http');
http.get({'host': 'api.ipify.org', 'port': 80, 'path': '/'}, function(resp) {
resp.on('data', function(ip) {
console.log("My public IP address is: " + ip);
});
});