refactor: demo agent (#81)

This commit is contained in:
sigoden
2024-07-29 17:26:36 +08:00
committed by GitHub
parent 226228dfa4
commit 213d1b3fd7
7 changed files with 73 additions and 47 deletions
+3 -4
View File
@@ -1,8 +1,7 @@
const os = require("node:os");
/**
* Get the system info
*/
exports.get_sysinfo = function getSysinfo() {
return `OS: ${os.type()}
Arch: ${os.arch()}`
exports.get_ipinfo = async function getIpinfo() {
const res = await fetch("https://httpbin.org/ip")
return res.json();
}