Node js calls the program of CPP

has done a small project. The need is to use Haikangwei"s webcam to monitor a certain area. If someone shows up, report the alarm information. Originally, I wanted to use fluorite clouds to get relevant information, but I had to pay for it, so I can only use Haikang products" own SDK for secondary development. I wrote it in node js backstage. Now Haikang is written in CPP, and I want to write a CPP program. To monitor the webcam to see if there is an alarm, after writing, how to use node js to call this CPP code to get the alarm information, so as to provide the corresponding parameters for processing in the node js program?

May.22,2021

Node.js calls local code. There are a lot of articles on the Internet. You can use node-ffi, such as this .


CPP I have not called. I called the C-sharp executable through the node child process child_process to invoke the thermal printer and ID reader. As for blog tutorials

, the CPP file can be compiled by calling CPP,node-gyp.
Menu