Skip to content

Commit

Permalink
docs: fix config and socketio error (#2884)
Browse files Browse the repository at this point in the history
* docs(config): remove test from config list
* docs(socketio): format and add desc for uws
  • Loading branch information
thonatos committed Aug 9, 2018
1 parent d39f84c commit 96ed020
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
1 change: 0 additions & 1 deletion docs/source/en/basics/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ This framework supports loading configuration according to the environment and d
```
config
|- config.default.js
|- config.test.js
|- config.prod.js
|- config.unittest.js
|- config.local.js
Expand Down
12 changes: 7 additions & 5 deletions docs/source/en/tutorials/socketio.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## title: Socket.IO

** Socket.IO ** is a real-time application framework based on Node.js, which has a wide range of applications including instant messaging, notification and message push, real-time analysis and other scenarios.
**Socket.IO** is a real-time application framework based on Node.js, which has a wide range of applications including instant messaging, notification and message push, real-time analysis and other scenarios.

WebSocket originated from the growing demand for real-time communication in web development, compared with http-based polling, which greatly saves network bandwidth and reduces server performance consumption. [Socket.IO] supports both websockets and polling. The data transmission method is compatible with the browser and does not support the communication requirements under the WebSocket scenario.

Expand All @@ -19,7 +19,7 @@ The framework provides the [egg-socket.io] plugin with the following development
$ npm i egg-socket.io --save
```

** Enable the plugin: **
**Enable the plugin:**

```js
// {app_root} /config/plugin.js
Expand Down Expand Up @@ -61,7 +61,9 @@ exports.io = {
};
```

** redis: **
> As µWS engine has been deprecated, maybe you should consider the default engine.
**redis:**

[egg-socket.io] has built-in redis support via `socket.io-redis`. In cluster mode, the use of redis can make it relatively simple to achieve information sharing of clients/rooms and so on

Expand Down Expand Up @@ -100,7 +102,7 @@ Modify the `npm scripts` script in`package.json`:
}
```

** Nginx configuration **
**Nginx configuration**

```
location / {
Expand Down Expand Up @@ -317,7 +319,7 @@ Module.exports = app => {
};
```

**Note: ** Each socket connection will have a random and unpredictable unique id `Socket#id` and will automatically be added to the room named after this `id`
**Note:** Each socket connection will have a random and unpredictable unique id `Socket#id` and will automatically be added to the room named after this `id`

## Examples

Expand Down
1 change: 0 additions & 1 deletion docs/source/zh-cn/basics/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ title: Config 配置
```
config
|- config.default.js
|- config.test.js
|- config.prod.js
|- config.unittest.js
`- config.local.js
Expand Down
5 changes: 4 additions & 1 deletion docs/source/zh-cn/tutorials/socketio.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ exports.io = {
};
```

> 已知默认 `wsEngine``Chrome` 浏览器中断开连接存在异常,建议优先使用 [uws]
> ~~已知默认 `wsEngine``Chrome` 浏览器中断开连接存在异常,建议优先使用 [uws]~~
>
> µWS 不再建议使用,请优先考虑默认引擎。

**redis:**

Expand Down

0 comments on commit 96ed020

Please sign in to comment.