Skip to content

Commit

Permalink
docs(quickstart): tip for controller and config style (#666)
Browse files Browse the repository at this point in the history
  • Loading branch information
atian25 authored and popomore committed Mar 28, 2017
1 parent e47c24b commit 5f5cf91
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/source/en/intro/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ $ npm run dev
$ open localhost:7001
```

> Note:
>
> - You could write `Controller` with `class` or `exports` style, see more detail at [Controller](../basics/controller.md).
> - And `Config` could write with `module.exports` or `exports` style, see more detail at [Node.js modules docs](https://nodejs.org/api/modules.html#modules_exports_shortcut).
### Add Static Assets

Egg has a built-in plugin called [static][egg-static].
Expand Down
5 changes: 5 additions & 0 deletions docs/source/zh-cn/intro/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ $ npm run dev
$ open localhost:7001
```

> 注意:
>
> - Controller 有 `class``exports` 两种编写方式,本文示范的是前者,你可能需要参考 [Controller](../basics/controller.md) 文档。
> - Config 也有 `module.exports``exports` 的写法,具体参考 [Node.js modules 文档](https://nodejs.org/api/modules.html#modules_exports_shortcut)
### 静态资源

Egg 内置了 [static][egg-static] 插件,线上环境建议部署到 CDN,无需该插件。
Expand Down

0 comments on commit 5f5cf91

Please sign in to comment.