1

I have written api using nodejs and calling those api's from Python code. I always have to make sure that my nodejs is running before I execute my python code. Can we make nodejs start running automatically while start executing python file.

For Example: we can achieve this in the angular just by including some code in package.json file, so that when I start angular server that will automatically run my node script as well.

I saw about "Python-Shell" package but "It is a simple way to run Python scripts from Node.js".

This is very important. Please help me!!

1 Answers1

0

In the package.json file, you will find a start property which define commands the console should run when the server is started.

  • Thank you Anh. Your answer was helpful. I also got the answer from this reference link:https://stackoverflow.com/questions/23450534/how-to-call-a-python-function-from-node-js/47655913 With this I am able to run my nodejs code, but immediately after running nodejs code I want my python code also to run. To achieve this we need to run python code from nodejs file as well. this reference link helped to achieve this. http://sweetme.at/2014/02/17/a-simple-approach-to-execute-a-node.js-script-from-python/ – DharaniMuli Jul 13 '19 at 06:41