上一页 1 ··· 5 6 7 8 9 10 下一页
摘要: 1.mongodb的聚合是有专门的一个方法的。 阅读全文
posted @ 2016-10-23 16:55 jay- 阅读(123) 评论(0) 推荐(0)
摘要: 1.查询时,不写条件的查询,速度要远远大于有条件的查询。 2.消除重复数据: 3.db.listCommands() 查看mongo的runCommand支持哪些功能了。 db.runCommand() 里面的参数还不一样,runCommand是非常底层的写法。 3.1db.runCommand({ 阅读全文
posted @ 2016-10-23 15:49 jay- 阅读(203) 评论(0) 推荐(0)
摘要: 配置File Transport winston.add(winston.transports.File, options) The File transport should really be the 'Stream' transport since it will accept any Wri 阅读全文
posted @ 2016-10-20 14:15 jay- 阅读(453) 评论(0) 推荐(0)
摘要: Further Reading 延伸阅读 Events and Callbacks in Winston winston的事件和回调 Each instance of winston.Logger is also an instance of an EventEmitter. A log event 阅读全文
posted @ 2016-10-20 14:05 jay- 阅读(1380) 评论(0) 推荐(0)
摘要: 上次讲到 Exceptions 例外 Handling Uncaught Exceptions with winston 使用winston处理未捕获的异常(这个如果对于异步,我不是很喜欢用) 使用winston,可以从进程捕获和记录uncaughtException事件。 有两种不同的方式通过默认 阅读全文
posted @ 2016-10-20 10:16 jay- 阅读(2426) 评论(0) 推荐(0)
摘要: Usage There are two different ways to use winston: directly via the default logger, or by instantiating your own Logger. The former is merely intended 阅读全文
posted @ 2016-10-19 18:39 jay- 阅读(3591) 评论(0) 推荐(0)
摘要: Object 对象 1._.merge(object, [sources]) 此方法类似于_.assign,除了它递归地将源对象的自有和继承的可枚举字符串键控属性合并到目标对象中。 如果存在目标值,将跳过解析为undefined的源属性。 数组和纯对象属性以递归方式合并。 其他对象和值类型将通过赋值 阅读全文
posted @ 2016-10-13 10:50 jay- 阅读(1895) 评论(0) 推荐(0)
摘要: 虽然es6已经出现一段时间了,但是对于没有使用es6的node.js的时候,仍要解决回调金字塔,因此Q还是很有必要的. 阅读全文
posted @ 2016-10-12 18:12 jay- 阅读(318) 评论(0) 推荐(0)
摘要: Switching out callbacks with promises in Mongoose Published on July 28, 2015 mongo node mongoose promises Working with promises and mongoose just beca 阅读全文
posted @ 2016-09-27 09:51 jay- 阅读(1028) 评论(0) 推荐(0)
摘要: 1. 1> 2> 重定向 2. 在~/.bashrc或者~/.zshrc上改别名 alias rm = 'rm -rf' 3.date获取当前的时间 date +%s(1970年距今的毫秒数) 4.= 定义变量,=的两边不能有空格. 5.$变量名 获取变量,设置变量 6.function fname 阅读全文
posted @ 2016-09-20 13:09 jay- 阅读(192) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 下一页
点击右上角即可分享
微信分享提示