Can I call the node command line or scripts in npm in a js file? If so, how should I do it?
为情所困2017-06-19 09:09:55
It depends on the environment you are in. If you are in a browser environment, errors may occur when executing these statements. If you are in a Node server environment, you may be able to directly use the API provided by Node instead of executing these statements through the command line yourself.
If you have to do this: http://www.cnblogs.com/chying...
You can refer to this tutorial
扔个三星炸死你2017-06-19 09:09:55
Use the exec method of chilld_process of node.js
Refer to https://nodejs.org/dist/lates...