Node calls CPP compiled files

I compiled a piece of CPP code to generate a file that (getpsdata), can run alone (. / getpsdata). Now I want to run this file in node to get the relevant output data and results in the code. I use the following code:
var spawn = require ("child_process"). Spawn;
var ps = spawn (". / getpsdata", {stdio: ["pipe"," pipe", "pipe"]});

if (ps.stdout! = = null) {

ps.stdout.on("data", function(data) {
  console.log("data", data.toString());
});

} else {

console.log(ps.stdout);

}
/ / ps.stdout.on ("data", function (data) {
/ / console.log (" data", data.toString ());
/ /});

if (ps.stderr! = = null) {

ps.stderr.on("data", function(data) {
  console.log("data", data.toString());
});

} else {

console.log(ps.stderr);

}

/ / ps.stderr.on ("data", function (data) {
/ / console.log (" error", data.toString ());
/ /});

ps.on ("close", function (code) {
console.log (" close", code);
});

ps.on ("exit",function (code) {

)
console.log("exit", code);

});

ps.on ("error", function (code) {
console.log (" error", code);
});

after my execution, the console does not have any output results. What should I do if I get the data printed or output in the getpsdata execution in the node program now?

Jun.29,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e6104e-45904.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e6104e-45904.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?