taegwon

app.js real final

...@@ -560,7 +560,7 @@ async function intersection() ...@@ -560,7 +560,7 @@ async function intersection()
560 { 560 {
561 const spawn = await require('child_process').spawn; 561 const spawn = await require('child_process').spawn;
562 for (var i = 0, j = 0; i < 3; i += 2, j++) { 562 for (var i = 0, j = 0; i < 3; i += 2, j++) {
563 - var result = await spawn('python', ['/home/ec2-user/menu_recommand_webpage/CHATBOT/fileread_practice.py', directory[i][Number(choosen[i]) - 1], directory[i + 1][Number(choosen[i + 1]) - 1], save_file_name[j]]); 563 + var result = await spawn('python', ['CHATBOT/fileread_practice.py', directory[i][Number(choosen[i]) - 1], directory[i + 1][Number(choosen[i + 1]) - 1], save_file_name[j]]);
564 await result.stdout.on('data', function (data) { 564 await result.stdout.on('data', function (data) {
565 console.log(data.toString()); 565 console.log(data.toString());
566 }); 566 });
...@@ -568,14 +568,14 @@ async function intersection() ...@@ -568,14 +568,14 @@ async function intersection()
568 console.log(data.toString()); 568 console.log(data.toString());
569 }); 569 });
570 } 570 }
571 - result = await spawn('python', ['/home/ec2-user/menu_recommand_webpage/CHATBOT/fileread_practice.py', save_file_name[0], save_file_name[1], save_file_name[2]]); 571 + result = await spawn('python', ['CHATBOT/fileread_practice.py', save_file_name[0], save_file_name[1], save_file_name[2]]);
572 result.stdout.on('data', function (data) { 572 result.stdout.on('data', function (data) {
573 console.log(data.toString()); 573 console.log(data.toString());
574 }); 574 });
575 await result.stderr.on('data', function (data) { 575 await result.stderr.on('data', function (data) {
576 console.log(data.toString()); 576 console.log(data.toString());
577 }); 577 });
578 - result = await spawn('python', ['/home/ec2-user/menu_recommand_webpage/CHATBOT/fileread_practice.py', save_file_name[2], directory[4][Number(choosen[4]) - 1], save_file_name[3]]); 578 + result = await spawn('python', ['CHATBOT/fileread_practice.py', save_file_name[2], directory[4][Number(choosen[4]) - 1], save_file_name[3]]);
579 result.stdout.on('data', function (data) { 579 result.stdout.on('data', function (data) {
580 console.log(data.toString()); 580 console.log(data.toString());
581 }); 581 });
......