Spaces:
Paused
Paused
Download func/ip.js from mikmc/hemsinabox: direct link, hf CLI and curl.
- Browser
- Download file 281 Bytes
-
https://huggingface.co/spaces/mikmc/hemsinabox/resolve/main/func/ip.js
- Command line
-
hf download hf://spaces/mikmc/hemsinabox/func/ip.js
-
curl -L -o ip.js https://huggingface.co/spaces/mikmc/hemsinabox/resolve/main/func/ip.js
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, | |
| }; | |