![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
nodejs
木瓜~
这个作者很懒,什么都没留下…
展开
-
【nodejs --学习01】: node之child_process
child_process.fork(modulePath[, args][, options]) modulePath String The module to run in the child args Array List of string arguments options Object cwd String Current working directory of the child原创 2017-10-26 17:15:13 · 313 阅读 · 0 评论 -
【nodejs --学习02】: nodejs之动态接收和处理命令行参数
关于node的process.argv参数都是从process.argv[2]开始的,并且伴随着动态输入的变化,参数的个数也跟着变化的,那么问题是我们能不能通过一个数组来完全接收这些动态变化的参数呢? 如果对ES6有研究的童鞋会发现,在ES6里面有个解构赋值,还有个rest参数。如果这两个叠起来用就可以实现我们的需求了。const [node, path, ...argv] = process.a原创 2017-11-14 10:49:04 · 4922 阅读 · 5 评论