Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(quickstart): tip for controller and config style #666

Merged
merged 1 commit into from
Mar 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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