mirror of
https://github.com/eggjs/egg.git
synced 2024-12-04 07:14:30 +00:00
docs(quickstart): fix keys (#511)
This commit is contained in:
parent
28b36b6781
commit
0465c3dfa9
@ -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`!**
|
||||
|
||||
@ -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`!**
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
title: 教程
|
||||
---
|
||||
|
||||
- [快速入门](../intro/quickstart.md)
|
||||
- [渐进式开发](./progressive.md)
|
||||
- [RESTful API](./restful.md)
|
||||
- [Async Function](./async-function.md)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user