feat(host): /api/host CPU/mem/disk/net from /proc

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-06-02 22:34:04 +10:00
parent 03803f39f0
commit 3492b24dac
4 changed files with 71 additions and 0 deletions

5
lib/api/routes/host.js Normal file
View File

@@ -0,0 +1,5 @@
import { Router } from 'express';
import { asyncWrap } from '../errors.js';
import { snapshot } from '../../host/resources.js';
export const router = Router();
router.get('/', asyncWrap(async (_req, res) => res.json(await snapshot())));