How to call python script from NodeJs

后端 未结 5 965
轻奢々
轻奢々 2020-12-01 07:06

I need to call this python script in NodeJs.

Read.py

#!/usr/bin/env python
# -*- coding: utf8 -*-

import RPi.GPIO as GPIO
import MF         


        
5条回答
  •  没有蜡笔的小新
    2020-12-01 07:24

    Adopt a micro-services approach. Host the Python script as a HTTP REST API service. Consume the API from node.js - you do not need to integrate the technologies; it's not scalable.

提交回复
热议问题