Skip to content

Commit

Permalink
docs: fix spelling mistakes and grammatical errors (#4423)
Browse files Browse the repository at this point in the history
Fixed many grammatical errors as well a couple of spelling
errors in faq.md in english language under en directory.
  • Loading branch information
vyasriday committed Aug 14, 2020
1 parent 5097628 commit 95776d6
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions docs/source/en/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ If you have questions that is not contained below, please check [Egg issues](htt
Thank you for reporting an issue.

1. It's RECOMMENDED to submit PR for typo or tiny bug fix.
2. If this's a FEATURE request, please provide: details, pseudo codes if necessary.
2. If this's a FEATURE request, please provide: details, pseudo-codes if necessary.
3. If this's a BUG, please provide: course repetition, error log and configuration. Fill in as much of the template below as you're able.
4. **It will be nice to use `npm init egg --type=simple bug` to provide a mini GitHub repository which can reproduce the issue.**

Expand All @@ -21,7 +21,7 @@ Framework [Config](./basics/config.md) settings is powerfull, support different

When you got some trouble, and want to find out what is the final config using at runtime, you can checkout `${root}/run/application_config.json`(workers' configurations) and `${root}/run/agent_config.json`(agent's configurations).(`root` is application's root directory, in `local` and `unittest` environments, it will be project base directory, in other environments will be HOME directory)

Please make sure you don't make mistake like the code below:
Please make sure you don't make a mistake like the code below:

```js
// config/config.default.js
Expand All @@ -35,19 +35,19 @@ module.exports = appInfo => {

## Where are my log files in prod environment?

By default, logs will print at `${baseDir}/logs`(baseDir is project's base directory) in local environment.But in non-development environments(neither local nor unittest), the logs will print at `$HOME/logs`(such as `/home/admin/logs`). So the logs won't mix in during development and locate in the same place when run in production environment.
By default, logs will print at `${baseDir}/logs`(baseDir is project's base directory) in the local environment. But in non-development environments(neither local nor unittest), the logs will print at `$HOME/logs`(such as `/home/admin/logs`). So the logs won't mix in during development and locate in the same place when run in production environment.

## Why not choose `PM2` as the process management tool?

1. `PM2` itself is too complex to issue problems if any.
2. Deep optimization could be difficlut to achieve if choosing PM2.
3. Pattern like one leader process communicating with remote services, along with serveral follower processes delegating request to it ([Cluster](./core/cluster-and-ipc.md)), is a rigid demand for reducing connections and data exchange load, espeically when facing applications in very large scale. egg originates from Ant Financial Group and Alibaba Group, we start with applications in that scale at first, so we take these goals into consideration. All of these goals above could be hard to achieve with PM2.
2. Deep optimization could be difficult to achieve if choosing PM2.
3. Pattern like one leader process communicating with remote services, along with several follower processes delegating the request to it ([Cluster](./core/cluster-and-ipc.md)), is a rigid demand for reducing connections and data exchange load, especially when facing applications in very large scale. egg originates from Ant Financial Group and Alibaba Group, we start with applications in that scale at first, so we take these goals into consideration. All of these goals above could be hard to achieve with PM2.

Process management is very important. It defines the way we write code, meanwhile relates to deep runtime optimizations. So we think it's better included in framework itself.
Process management is very important. It defines the way we write code, meanwhile relates to deep runtime optimizations. So we think it's better included in the framework itself.

**How to start application with PM2?**

Although PM2 is not recommanded, you can use it anyway.
Although PM2 is not recommended, you can use it anyway.

Firstly, put a start file in the root directory of your project:

Expand All @@ -62,7 +62,7 @@ egg.startCluster({
});
```

We can start application with PM2 like this:
We can start the application with PM2 like this:

```bash
pm2 start server.js
Expand All @@ -77,9 +77,9 @@ There are two kinds of common csrf errors:

By default [egg-security](https://github.com/eggjs/egg-security/) plugin built in Egg requires CSRF validation against all 'unsafe' request such as `POST`, `PUT`, `DELETE` requests.

The error will disappear in the presence of correct csrf token in request. For more implentation details, see [./core/security.md#csrf].
The error will disappear in the presence of the correct csrf token in the request. For more implementation details, see [./core/security.md#csrf].

## In local development Environment, why is worker process not restarted automatically when files are modified?
## In the local development Environment, why is the worker process not restarted automatically when files are modified?

Usually this happens when you are using Jetbrains softwares(IntelliJ IDEA, WebStorm, etc.) with `Safe Write` turned on.

Expand Down

0 comments on commit 95776d6

Please sign in to comment.