koa-book icon indicating copy to clipboard operation
koa-book copied to clipboard

koa.js实战

Results 8 koa-book issues
Sort by recently updated
recently updated
newest added

koa2中间件都不用Generator了,貌似要精致一点,大佬有没有时间更新一下呢

should断言库这个章节的那一段代码在我这里运行不起来,一直提示我没有should模块,我应该怎样引入该模块呢?使用以下命令还是不行 npm i should -g 希望看到的老师们帮我解答一下。

> 学习的曲线是先难后易,先苦后点 ,错字。

https://github.com/alexmingoia/koa-router#exp_module_koa-router--Router 请查看链接。

koa中间件实现原理中 ``` return co(function *(){ ...... })(); ``` 代码有问题,改为如下 ``` return co(function *(){ ...... }); ``` > co的执行方式直接为co(gen);

根据书中例子 我在demo.js 中写了 app.use(function *(){ this.demo = 'test text'; }); app.use(function *(){ this.body = this.demo; }); 但是 貌似 运行的时候,没有进入第二个 ,页面显示 no found 求大神给看一下原因