Skip to content

Commit

Permalink
Chroe: Fix something in articles (#3349)
Browse files Browse the repository at this point in the history
1) For 'cookie-and-session.md', fix the icon, to make it the same as
"Error".
2) For 'cluster-and-ipc.md', Merge the two pharagraphs together, and
for the Chinese version, translate the English part into Chinese.'
  • Loading branch information
Maledong authored Dec 29, 2018
1 parent 0b6a8ce commit 37e3c1a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/source/en/core/cluster-and-ipc.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ We know that JavaScript codes are run on single thread, in other words, one Node

> how to squeeze all server resources, taking advantages of multi-cores?
And the official solution provided by Node.js is [Cluster module](https://nodejs.org/api/cluster.html)
And the official solution provided by Node.js is [Cluster module](https://nodejs.org/api/cluster.html), and there's an introduction:

> A single instance of Node.js runs in a single thread. To take advantage of multi-core systems the user will sometimes want to launch a cluster of Node.js processes to handle the load.
>
> The cluster module allows you to easily create child processes that all share server ports.
# What is Cluster?
Expand Down
2 changes: 1 addition & 1 deletion docs/source/en/core/cookie-and-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ What you need to pay special attention to is that you need to avoid the followin
ctx.session._visited = 1; // --> property will lost
ctx.session.isNew = 'HeHe'; // --> session keyword, should not write it

// Right way
// ✔️ Right way
ctx.session.visited = 1; // --> Everything is all right
```

Expand Down
8 changes: 4 additions & 4 deletions docs/source/zh-cn/core/cluster-and-ipc.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ title: 多进程模型和进程间通讯

> 如何榨干服务器资源,利用上多核 CPU 的并发优势?
而 Node.js 官方提供的解决方案是 [Cluster 模块](https://nodejs.org/api/cluster.html)
而 Node.js 官方提供的解决方案是 [Cluster 模块](https://nodejs.org/api/cluster.html),其中包含一段简介:

> A single instance of Node.js runs in a single thread. To take advantage of multi-core systems the user will sometimes want to launch a cluster of Node.js processes to handle the load.
> The cluster module allows you to easily create child processes that all share server ports.
> 单个 Node.js 实例在单线程环境下运行。为了更好地利用多核环境,用户有时希望启动一批 Node.js 进程用于加载。
>
> 集群化模块使得你很方便地创建子进程,以便于在服务端口之间共享。
## Cluster 是什么呢?

Expand Down
2 changes: 1 addition & 1 deletion docs/source/zh-cn/core/cookie-and-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ ctx.session = null;
ctx.session._visited = 1; // --> 该字段会在下一次请求时丢失
ctx.session.isNew = 'HeHe'; // --> 为内部关键字, 不应该去更改

// 正确的用法
// ✔️ 正确的用法
ctx.session.visited = 1; // --> 此处没有问题
```

Expand Down

0 comments on commit 37e3c1a

Please sign in to comment.