docs(quickstart): fix keys (#511)

This commit is contained in:
TZ | 天猪 2017-03-05 18:19:56 +08:00 committed by Haoliang Gao
parent 28b36b6781
commit 0465c3dfa9
3 changed files with 21 additions and 8 deletions

View File

@ -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`!**

View File

@ -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`!**

View File

@ -1,6 +1,6 @@
title: 教程
---
- [快速入门](../intro/quickstart.md)
- [渐进式开发](./progressive.md)
- [RESTful API](./restful.md)
- [Async Function](./async-function.md)