在NodeJS 中執(zhí)行一個(gè) JS 文件,如果想在這個(gè)文件中再同時(shí)(異步)執(zhí)行另一個(gè) JS 文件,可以使用 child_process 模塊中的 spawn 來實(shí)現(xiàn),spawn 可以幫助我們創(chuàng)建一個(gè)子進(jìn)程,用法如下。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 // 文件:process.js const { spawn } = require("child...
www.dbjr.com.cn/article/1489...htm 2018-10-17