diff --git a/docs/source/en/intro/quickstart.md b/docs/source/en/intro/quickstart.md index 5f131f89d..5f58bed5a 100644 --- a/docs/source/en/intro/quickstart.md +++ b/docs/source/en/intro/quickstart.md @@ -83,7 +83,6 @@ module.exports = app => { Then edit the router file and add a mapping. - ```js // app/router.js module.exports = app => { @@ -91,6 +90,14 @@ module.exports = app => { }; ``` +Then add a configuration file: + +```js +// config/config.default.js +// should change to your own keys +exports.keys = '123456'; +``` + The project directory looks like this: ```bash @@ -99,6 +106,8 @@ egg-example │ ├── controller │ │ └── home.js │ └── router.js +├── config +│ └── config.default.js └── package.json ``` @@ -166,9 +175,6 @@ exports.view = { '.tpl': 'nunjucks', }, }; - -// should change to your own keys -exports.keys = '123456'; ``` **Carefull! `config` dir, not `app/config`!** diff --git a/docs/source/zh-cn/intro/quickstart.md b/docs/source/zh-cn/intro/quickstart.md index 754d200a2..48fd4b904 100644 --- a/docs/source/zh-cn/intro/quickstart.md +++ b/docs/source/zh-cn/intro/quickstart.md @@ -82,6 +82,14 @@ module.exports = app => { }; ``` +加一个配置文件: + +```js +// config/config.default.js +// 切记:要改为自己的 key 值 +exports.keys = '123456'; +``` + 此时目录结构如下: ```bash @@ -90,6 +98,8 @@ egg-example │ ├── controller │ │ └── home.js │ └── router.js +├── config +│ └── config.default.js └── package.json ``` @@ -151,9 +161,6 @@ exports.view = { '.tpl': 'nunjucks', }, }; - -// 切记:要改为自己的 key 值 -exports.keys = '123456'; ``` **注意:是 `config` 目录,不是 `app/config`!** diff --git a/docs/source/zh-cn/tutorials/index.md b/docs/source/zh-cn/tutorials/index.md index 31fae904f..d275c0928 100644 --- a/docs/source/zh-cn/tutorials/index.md +++ b/docs/source/zh-cn/tutorials/index.md @@ -1,6 +1,6 @@ title: 教程 --- - +- [快速入门](../intro/quickstart.md) - [渐进式开发](./progressive.md) - [RESTful API](./restful.md) - [Async Function](./async-function.md)