📅  最后修改于: 2022-03-11 15:03:13.183000             🧑  作者: 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);
});
});