mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 16:57:58 +01:00
add system information
This commit is contained in:
parent
298c618150
commit
7afbbd03f8
1 changed files with 8 additions and 0 deletions
|
@ -27,6 +27,7 @@ function getJson(str) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const pkg = require("../../../package.json");
|
const pkg = require("../../../package.json");
|
||||||
|
const os = require('os');
|
||||||
const cnf = require("../../../config.json");
|
const cnf = require("../../../config.json");
|
||||||
const innertube = require("../libpoketube-youtubei-objects.json");
|
const innertube = require("../libpoketube-youtubei-objects.json");
|
||||||
|
|
||||||
|
@ -215,6 +216,9 @@ app.use("/sb/i/:v/:imagePath/:img", async function (req, res) {
|
||||||
.then((res) => res.text())
|
.then((res) => res.text())
|
||||||
.then((txt) => getJson(txt));
|
.then((txt) => getJson(txt));
|
||||||
|
|
||||||
|
const cpus = os.cpus();
|
||||||
|
const totalMemory = os.totalmem();
|
||||||
|
|
||||||
const response = {
|
const response = {
|
||||||
pt_version: {
|
pt_version: {
|
||||||
version:versmol,
|
version:versmol,
|
||||||
|
@ -226,6 +230,10 @@ app.use("/sb/i/:v/:imagePath/:img", async function (req, res) {
|
||||||
vernum: versionnumber,
|
vernum: versionnumber,
|
||||||
codename,
|
codename,
|
||||||
config:cnf,
|
config:cnf,
|
||||||
|
system:{
|
||||||
|
ram:`${totalMemory / (1024 * 1024 * 1024)} GB`,
|
||||||
|
cpu:cpus[0].model,
|
||||||
|
},
|
||||||
packages: {
|
packages: {
|
||||||
libpt: version,
|
libpt: version,
|
||||||
node: process.version,
|
node: process.version,
|
||||||
|
|
Loading…
Reference in a new issue