강현태

Add header

......@@ -28,11 +28,13 @@ router.post('/getPredict',function(req,res,next){
}
})
//csv포맷에 맞춰 출력
let csv = normal_json.map((val)=>val.value).join(',');
let csv1 = normal_json.map((val)=>val.name).join(',');
let csv2 = normal_json.map((val)=>val.value).join(',');
csv = csv1 + '\n' +csv2;
fs.writeFileSync('./inspection.csv',csv);
//스크립트 수행.
const result = rscript.callSync('./test.R', {path : process.cwd()+'/inspection.csv'});
const result = rscript.callSync('/home/swc/capD/model/model.r', {path : process.cwd()+'/inspection.csv'});
res.json(result);
})
});
......