Advertisement
yudhaez0212

Untitled

Oct 20th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. const express = require('express')
  2. const app = express()
  3. const port = 3000
  4. const os = require('os');
  5. const si = require('systeminformation');
  6.  
  7. app.get('/', (req, res) => {
  8. si.cpu(function(data) {
  9. console.log('CPU//////')
  10. console.log(data);
  11. })
  12. si.mem(function(data) {
  13. console.log('MEMORY//////')
  14. console.log(data);
  15. })
  16. si.diskLayout(function(data) {
  17. console.log('DISK//////')
  18. console.log(data);
  19. })
  20. })
  21.  
  22. app.listen(port, () => {
  23. console.log(`Example app listening at ${port}`)
  24. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement