![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
node.js
马红权
从事分析仪器软件开发N年,掌握语言平台无数。
展开
-
通过promise 解决打开文件过多的错误。
写了个脚本把material-ui的图标js文件转换为svg文件,由于文件数量多,出现EMFILE: too many open files错误。改为等待writestream关闭。function changeOne(one){ return new Promise( function (resolve, reject) { var F1=require("@material-ui/icons/"+one).default; var str=R原创 2021-04-18 14:05:54 · 106 阅读 · 0 评论 -
javascript sleep by promise
function sleep(ms) { return new Promise(resolve=>setTimeout(resolve, ms))}async function main(){ console.log("wait") await sleep(5000); console.log("finish")}main()原创 2021-04-18 13:59:19 · 89 阅读 · 0 评论 -
利用node-inspector 调试node.js程序
初次运行node-inspector,还是会出现错误。在这里记录一下运行过程。原创 2014-02-10 12:58:58 · 1106 阅读 · 0 评论