This commit is contained in:
2
index.js
2
index.js
@@ -14,7 +14,7 @@ app.use((req, res, next) => {
|
|||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 提供接口,查询ubuntu server上的ipv6地址,处理字符串后,序列化为json返回
|
// 提供接口,查询ubuntu server上的ipv6地址,处理字符串后,序列化为json返回.
|
||||||
app.get('/ip', async (req, res) => {
|
app.get('/ip', async (req, res) => {
|
||||||
let output = execSync(command, { encoding: "utf8" });
|
let output = execSync(command, { encoding: "utf8" });
|
||||||
res.json(await ip.parseNetworkInfo(output))
|
res.json(await ip.parseNetworkInfo(output))
|
||||||
|
|||||||
Reference in New Issue
Block a user