Below you will find pages that utilize the taxonomy term “Koa”
March 21, 2016
如何优雅的在 koa 中处理错误
"\u003cp\u003e\u003ca href=\"http://taobaofed.org/blog/2016/03/18/error-handling-in-koa/\"\u003ehttp://taobaofed.org/blog/2016/03/18/error-handling-in-koa/\u003c/a\u003e\u003c/p\u003e"
March 21, 2016
koa中生成器函数generator执行顺序详解
"\u003cp\u003e\u003cstrong\u003eES6的generator\u003c/strong\u003e \u003ca href=\"http://book.apebook.org/minghe/koa-action/co/start.html\"\u003ehttp://book.apebook.org/minghe/koa-action/co/start.html\u003c/a\u003e\u003c/p\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e\nfunction* gen() {\n var a = yield \u0026#39;start\u0026#39;;\n console.log(a);\n var b = yield \u0026#39;end\u0026#39;;\n console.log(b);\n return \u0026#39;over\u0026#39;;\n}\nvar it = gen();\nconsole.log(it.next()); // {value: \u0026#39;start\u0026#39;, done: false}\nconsole.log(it.next(22)); // 22 {value: \u0026#39;end\u0026#39;, done: false}\nconsole.log(it.next(333)); // 333 {value: \u0026#39;over\u0026#39;, done: true}\n\u003c/code\u003e\u003c/pre\u003e\u003cp\u003e带有 \u003ccode\u003e*\u003c/code\u003e 的函数声明表示是一个 generator 函数,当执行 \u003ccode\u003egen()\u003c/code\u003e 时,函数体内的代码并没有执行, …\u003c/p\u003e"
March 10, 2016
nodejs学习资料
"\u003cp\u003e修改npm包管理器的registry( \u003ca href=\"http://registry.npmjs.org/\"\u003eregistry.npmjs.org\u003c/a\u003e)为淘宝镜像( \u003ca href=\"http://npm.taobao.org\"\u003enpm.taobao.org\u003c/a\u003e),参考nam config -h 相关命令\u003c/p\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003enpm config set registry “https://registry.npm.taobao.org“\n\u003c/code\u003e\u003c/pre\u003e\u003cp\u003e\u003ca href=\"http://npm.taobao.org\"\u003ehttp://npm.taobao.org\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e七天学会NodeJS \u003ca href=\"http://nqdeng.github.io/7-days-nodejs/\"\u003ehttp://nqdeng.github.io/7-days-nodejs/\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eNode.js Style Guide \u003ca href=\"https://github.com/dead-horse/node-style-guide\"\u003ehttps://github.com/dead-horse/node-style-guide\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e深入Node.js的模块机制 \u003ca href=\"http://www.infoq.com/cn/articles/nodejs-module-mechanism/\"\u003ehttp://www.infoq.com/cn/articles/nodejs-module-mechanism/\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e学习ES6生成器(Generator) \u003ca href=\"http://www.toobug.net/article/learning_es6_generator.html\"\u003ehttp://www.toobug.net/article/learning_es6_generator.html\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003erequire() 源码解读 \u003ca href=\"http://www.ruanyifeng.com/blog/2015/05/require.html\"\u003ehttp://www.ruanyifeng.com/blog/2015/05/require.html …\u003c/a\u003e\u003c/p\u003e"