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): fix keys #511

Merged
merged 1 commit into from Mar 5, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 10 additions & 4 deletions docs/source/en/intro/quickstart.md
Expand Up @@ -83,14 +83,21 @@ module.exports = app => {

Then edit the router file and add a mapping.


```js
// app/router.js
module.exports = app => {
app.get('/', 'home.index');
};
```

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
Expand All @@ -99,6 +106,8 @@ egg-example
│ ├── controller
│ │ └── home.js
│ └── router.js
├── config
│ └── config.default.js
└── package.json
```

Expand Down Expand Up @@ -166,9 +175,6 @@ exports.view = {
'.tpl': 'nunjucks',
},
};

// should change to your own keys
exports.keys = '123456';
```

**Carefull! `config` dir, not `app/config`!**
Expand Down
13 changes: 10 additions & 3 deletions docs/source/zh-cn/intro/quickstart.md
Expand Up @@ -82,6 +82,14 @@ module.exports = app => {
};
```

加一个配置文件:

```js
// config/config.default.js
// 切记:要改为自己的 key 值
exports.keys = '123456';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我的意思是在 egg-init egg-example --type=simple 的时候自动随机生成一个 keys

```

此时目录结构如下:

```bash
Expand All @@ -90,6 +98,8 @@ egg-example
│ ├── controller
│ │ └── home.js
│ └── router.js
├── config
│ └── config.default.js
└── package.json
```

Expand Down Expand Up @@ -151,9 +161,6 @@ exports.view = {
'.tpl': 'nunjucks',
},
};

// 切记:要改为自己的 key 值
exports.keys = '123456';
```

**注意:是 `config` 目录,不是 `app/config`!**
Expand Down
2 changes: 1 addition & 1 deletion 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)
Expand Down