mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 03:10:46 +08:00
Sample Windows CPU via Processor Utility so values match Task Manager, and expose host metrics on /v1/metrics/json for the workbench poll. Co-authored-by: Cursor <cursoragent@cursor.com>
23 lines
531 B
TypeScript
23 lines
531 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
"/v1": {
|
|
target: "http://127.0.0.1:8890",
|
|
changeOrigin: true,
|
|
ws: true,
|
|
// Keep Origin aligned with upstream for WS handshake through proxy.
|
|
rewriteWsOrigin: true,
|
|
},
|
|
"/metrics": {
|
|
target: "http://127.0.0.1:8890",
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
})
|