Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 96ed020

Browse files
authored
docs: fix config and socketio error (eggjs#2884)
* docs(config): remove test from config list * docs(socketio): format and add desc for uws
1 parent d39f84c commit 96ed020

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

docs/source/en/basics/config.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ This framework supports loading configuration according to the environment and d
1717
```
1818
config
1919
|- config.default.js
20-
|- config.test.js
2120
|- config.prod.js
2221
|- config.unittest.js
2322
|- config.local.js

docs/source/en/tutorials/socketio.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## title: Socket.IO
22

3-
** 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.
3+
**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.
44

55
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.
66

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

22-
** Enable the plugin: **
22+
**Enable the plugin:**
2323

2424
```js
2525
// {app_root} /config/plugin.js
@@ -61,7 +61,9 @@ exports.io = {
6161
};
6262
```
6363

64-
** redis: **
64+
> As µWS engine has been deprecated, maybe you should consider the default engine.
65+
66+
**redis:**
6567

6668
[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
6769

@@ -100,7 +102,7 @@ Modify the `npm scripts` script in`package.json`:
100102
}
101103
```
102104

103-
** Nginx configuration **
105+
**Nginx configuration**
104106

105107
```
106108
location / {
@@ -317,7 +319,7 @@ Module.exports = app => {
317319
};
318320
```
319321

320-
**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`
322+
**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`
321323

322324
## Examples
323325

docs/source/zh-cn/basics/config.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ title: Config 配置
1818
```
1919
config
2020
|- config.default.js
21-
|- config.test.js
2221
|- config.prod.js
2322
|- config.unittest.js
2423
`- config.local.js

docs/source/zh-cn/tutorials/socketio.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ exports.io = {
6262
};
6363
```
6464

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

6770
**redis:**
6871

0 commit comments

Comments
 (0)