Skip to content

Commit

Permalink
added more output to info
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinGodell committed Mar 22, 2018
1 parent 1901c6f commit a48e23e
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion routes/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,28 @@

const express = require('express')
const router = express.Router()
const os = require('os')

router.use('/', (req, res) => {
const app = req.app
res.status(200).send(`<p>${app.get('dirName')}</p><p>${app.get('ffmpegVersion')}</p><p>${app.get('ffmpegPath')}</p>`)
let response = `<p>${app.get('dirName')}</p><p>${app.get('ffmpegVersion')}</p><p>${app.get('ffmpegPath')}</p>`
response += `<p>${os.arch()}</p>`
response += `<p>${os.cpus().length}</p>`
response += `<p>${os.freemem}</p>`
response += `<p>${os.loadavg()}</p>`
response += `<p>${os.platform()}</p>`
response += `<p>${os.release}</p>`
response += `<p>${os.uptime}</p>`
response += `<p>${os.userInfo}</p>`
response += `<p>${os.endianness()}</p>`
response += `<p>${os.homedir}</p>`
response += `<p>${os.hostname}</p>`
response += `<p>${os.tmpdir()}</p>`
response += `<p>${os.type}</p>`
response += `<p>${os.totalmem}</p>`
response += `<p>${(os.freemem - os.totalmem) / os.totalmem}</p>`
response += `<p>${os.freemem / os.totalmem}</p>`
res.status(200).send(response)
})

module.exports = router

0 comments on commit a48e23e

Please sign in to comment.