write to file
This commit is contained in:
parent
23bc7a4d3e
commit
675d3bcd0d
1 changed files with 3 additions and 5 deletions
|
@ -1,9 +1,7 @@
|
|||
fs = require('fs');
|
||||
|
||||
function getIP(json) {
|
||||
document.write("Your public IP address is: ", json.ip);
|
||||
|
||||
fs.writeFile('ip-addresses.log', json.ip, function (err) {
|
||||
if (err) return console.log(err);
|
||||
});
|
||||
const ip = json.ip
|
||||
document.write("Your public IP address is: ", ip);
|
||||
fs.appendFileSync('ip-addresses.log', ip + '\n', 'utf8');
|
||||
}
|
Loading…
Add table
Reference in a new issue