![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
nodejs
gaochengyidlmu
这个作者很懒,什么都没留下…
展开
-
nvm报错 ERROR open \settings.txt: The system cannot find the file specified
nvm报错 ERROR open \settings.txt: The system cannot find the file specified原创 2017-02-07 10:52:05 · 20454 阅读 · 2 评论 -
nodejs实现导出、下载功能
财务类客户会经常需要将数据库中的数据以excel的形式导出,在此我选用 node-xlsx 模块,用于导出一份固定格式的excel,然后用express中的res.download方法,为前端提供文件下载。#语法糖为coffeeScriptfs = require("fs")xlsx = require("node-xlsx")uuid = require("node-uuid")export原创 2017-02-03 14:58:52 · 5130 阅读 · 0 评论 -
在使用javascript-state-machine状态机调用异步钩子函数时,卡死问题及抛出异常问题
2017-03-16:更新 使用外面包裹一层async函数的方式难以抛出异常,而且很丑陋。 经过艰苦的摸索(妈蛋,新版的文档也补全),终于找到了一个抛出异常的方式。这是钩子函数中,大致思路就是代码中抛出错误,然后抓取到后用reject向调用函数返回一个异常实例。 注意一定要resolve,不然会卡死。 onBeforeTransition: function (action, t) {原创 2017-03-15 11:17:36 · 1410 阅读 · 0 评论