const express = require('express');
const app = express();
const { exec } = require('child_process');
var status = '';
app.get('/', (req, res) => {
res.send('
RPI Speedify Status'+status+'');
});
setInterval(function(){
exec('/usr/share/speedify/speedify_cli show adapters', (error, stdout, stderr) => {
if (error) {
return;
}
status = stdout;
});
},5000);
app.listen(80);