Skip to content

Commit

Permalink
chroe(doc): Fix some typos (#2988)
Browse files Browse the repository at this point in the history
1) Clearify the declaration 'this.ctx....', we must use 'this' here.
2) Remove unknown character in 'objects.md'.
3) Change the question mark in Chinese mode.
  • Loading branch information
Maledong authored and atian25 committed Sep 11, 2018
1 parent 688067a commit b02ce15
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/source/en/basics/app-start.md
Expand Up @@ -29,7 +29,7 @@ module.exports = app => {
// app/controller/home.js
class HomeController extends Controller {
async index() {
// now you can use `ctx.app.cities`
// 'app.cities' is loaded, and you can access it by 'this.ctx.app.cities'
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/source/zh-cn/basics/app-start.md
Expand Up @@ -28,7 +28,7 @@ module.exports = app => {
// app/controller/home.js
class HomeController extends Controller {
async index() {
// ctx.app.cities 在上面启动期间已经加载,可以直接使用
// 'app.cities' 在上面启动期间已经加载,可以直接通过 'this.ctx.app.cities' 使用。
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/source/zh-cn/basics/objects.md
Expand Up @@ -11,7 +11,7 @@ Application 是全局应用对象,在一个应用中,只会实例化一个

在框架运行时,会在 Application 实例上触发一些事件,应用开发者或者插件开发者可以监听这些事件做一些操作。作为应用开发者,我们一般会在[启动自定义脚本](./app-start.md)中进行监听。

- `server`: 该事件一个 worker 进程只会触发一次,在 HTTP 服务完成启动后,会将 HTTP server 通过这个事件暴露出来给开发者。
- `server`: 该事件一个 worker 进程只会触发一次,在 HTTP 服务完成启动后,会将 HTTP server 通过这个事件暴露出来给开发者。
- `error`: 运行时有任何的异常被 onerror 插件捕获后,都会触发 `error` 事件,将错误对象和关联的上下文(如果有)暴露给开发者,可以进行自定义的日志记录上报等处理。
- `request``response`: 应用收到请求和响应请求时,分别会触发 `request``response` 事件,并将当前请求上下文暴露出来,开发者可以监听这两个事件来进行日志记录。

Expand Down
2 changes: 1 addition & 1 deletion docs/source/zh-cn/basics/router.md
Expand Up @@ -321,7 +321,7 @@ module.exports = app => {
// curl http://localhost:7001/search?name=egg
```

### 太多路由映射?
### 太多路由映射

如上所述,我们并不建议把路由规则逻辑散落在多个地方,会给排查问题带来困扰。

Expand Down

0 comments on commit b02ce15

Please sign in to comment.