Skip to content

Commit

Permalink
docs: typo (#1029)
Browse files Browse the repository at this point in the history
  • Loading branch information
perzy authored and dead-horse committed Jun 10, 2017
1 parent 13b7c19 commit 3d04199
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/source/zh-cn/intro/egg-and-koa.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ run(main());
[async function] 的原理其实和 [co] 类似,但它是语言层面提供的语法糖,通过 async function 编写的代码和 co + generator 编写的代码看起来很类似。

```js
const fn = co(function*() {
const fn = co.wrap(function*() {
const user = yield getUser();
const posts = yield fetchPosts(user.id);
return { user, posts };
Expand All @@ -85,7 +85,7 @@ async function 虽然尚未随着规范发布,但是 Node.js 7.x 中带的 V8
Koa 和 Express 的设计风格非常类似,底层也都是共用的[同一套 HTTP 基础库](https://github.com/jshttp),但是有几个显著的区别,除了上面提到的默认异步解决方案之外,主要的特点还有下面几个。

### Midlleware
### Middleware

Koa 的中间件和 Express 不同,Koa 选择了洋葱圈模型。

Expand Down

0 comments on commit 3d04199

Please sign in to comment.