react&node.js 개발 -python-shell이용해서 서버에서 python 프로그램 실행시키기-

1. python-shell 설치 딥러닝 모델같은 파이썬 프로그램을 웹 프로젝트에서 사용하고 싶을때가 있다 node.js에서 파이썬 프로그램을 사용할 수 있는 모듈이 존재하는데 python-shell을 먼저 설치 $npm install python-shell 2. 기본 구조 기본 구조는 다음과 같다 PythonShell.run(파일경로, options, function) const { PythonShell } = require('python-shell'); PythonShell.run('./makeup.py',options,function(err,results) { if (err) { throw err; } console.log(results); }) 여기서 options는 파일 실행할때 설정할 옵션을 ..