nodejs 벡엔드에서 Python (Script) 함수 실행하는 방법

자식프로세스를 생성한 후 .py 를 실행 함. 

 

mac에서는 python3로 해야한다. 

 

1.  http://daplus.net/python-node-js%EC%97%90%EC%84%9C-python-%ED%95%A8%EC%88%98%EB%A5%BC-%ED%98%B8%EC%B6%9C%ED%95%98%EB%8A%94-%EB%B0%A9%EB%B2%95/

 

[python] Node.js에서 Python 함수를 호출하는 방법 - 리뷰나라

Express Node.js 응용 프로그램이 있지만 Python에서 사용할 기계 학습 알고리즘도 있습니다. 기계 학습 라이브러리의 강력한 기능을 활용하기 위해 Node.js 애플리케이션에서 Python 함수를 호출 할 수있

daplus.net

 

2. child_process.spawn

 

https://nodejs.sideeffect.kr/docs/v0.8.15/api/child_process.html#child_process_child_process_spawn_command_args_options

 

Child Process Node.js v0.8.15 Manual & Documentation

Child Process# Stability: 3 - Stable Node provides a tri-directional popen(3) facility through the child_process module. It is possible to stream data through a child's stdin, stdout, and stderr in a fully non-blocking way. To create a child process use re

nodejs.sideeffect.kr

3. https://www.youtube.com/watch?v=ZwBeWHf7zRE 

 

4. https://www.youtube.com/watch?v=FjDOJzqnpBQ 

 

5. https://github.com/techweber/nodejs-python

 

GitHub - techweber/nodejs-python: Call Python Script from Node JS

Call Python Script from Node JS. Contribute to techweber/nodejs-python development by creating an account on GitHub.

github.com

 

'2024이전 > 3_2sw대전 프로젝트' 카테고리의 다른 글

Tensorflow관련 실행  (0) 2022.11.29

+ Recent posts