javascript - How to call node command line command in js
世界只因有你
世界只因有你 2017-06-19 09:07:55
0
2
996

Can I call the node command line or scripts in npm in a js file? If so, how should I do it?

世界只因有你
世界只因有你

reply all(2)
为情所困

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

扔个三星炸死你

Use the exec method of chilld_process of node.js
Refer to https://nodejs.org/dist/lates...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template