Expose systeminformation as REST APIs
npm install systeminformation-apiClone or download it from git hub:
``git clone https://github.com/asokolsky/systeminformation-api.git`
or just use npm to download and install it:
`npm i systeminformation-api`
`npm install`
`node test`
`node index.js`
Finally, point your browser
http://localhost:3000/api/systeminformation/cpu
``
node index.js [{-p|--port}:
- {-p|--port}:`` - specifies port on which the service will listen for incoming HTTP connections
- -z|--zip - will force express to use gzip encoding - experimental, not for production
- -h|--help - display command line spec
- -v|--version - show package version
Only HTTP GET is supported.
The URIs start with `/api/systeminformation` followed by:
- empty string - returns systeminformation package version
- time - returns time JSON
- system
- bios
- baseboard
- cpu
- cpuFlags
- cpuCache
- cpuCurrentSpeed
- cpuTemperature
- mem
- memLayout
- diskLayout
- battery
- graphics
- osInfo
- versions
- shell
- users
- fsSize
- blockDevices
- fsStats
- disksIO
- networkInterfaces
- networkInterfaceDefault
- networkStats
- networkConnections
- currentLoad
- fullLoad
- processes
- dockerContainers
- dockerAll
- getStaticData
- getDynamicData
For a full description of the underlying functionality see the systeminformation documentation.
$env:DEBUG='siapi';node .\index.js
`Try this to learn more about express:
`
$env:DEBUG='*';node .\index.js
``If you have an opinion or ideas on the below list - please do tell.
https://github.com/tallesl/qckwinsvc