hemsinabox / func /ip.js
mikmc's picture
Upload 10 files
1f52f7e verified
Raw History Blame Contribute Delete
281 Bytes
const axios = require("axios");
async function getIpData() {
try {
const { data } = await axios.get("http://ip-api.com/json/");
return data;
} catch (error) {
console.error("Error fetching data:", error);
return null;
}
}
module.exports = {
getIpData,
};