Skip to content

Commit

Permalink
Update docs (stoplightio#1330)
Browse files Browse the repository at this point in the history
* docs: add stuff

* another fix
  • Loading branch information
XVincentX authored Aug 11, 2020
1 parent d3b671c commit ea5823a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ If you are adding a new runtime dependency, add it to the relevant `package.json

### Testing

Prism has an extensive test suite. To run it, just use the regular `test` script
Prism has an extensive test suite. To run it, use the regular `test` script

```bash
yarn test
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ Check these projects out!
[http]: https://www.npmjs.com/package/@stoplight/prism-http
[http-server]: https://www.npmjs.com/package/@stoplight/prism-http-server
[cli]: https://www.npmjs.com/package/@stoplight/prism-cli
[cli-docs]: ./docs/cli.md
[cli-docs]: ./docs/getting-started/03-cli.md
[2.x]: https://github.com/stoplightio/prism/tree/2.x
[http-docs]: packages/http/README.md
2 changes: 1 addition & 1 deletion docs/getting-started/03-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,4 @@ The response body contains the found output violations.

When running in development mode (which happens when the `NODE_ENV` environment variable is not set to `production`) or the `-m` flag is set to false, both the HTTP Server and the CLI (which is responsible of parsing and showing the received logs on the screen) will run within the same process.

Processing logs slows down the process significantly. If you're planning to use the CLI in production (for example in a Docker Container) we recommend to run the CLI with the `-m` flag or set the `NODE_ENV` variable to `production`. In this way, the CLI and the HTTP server will run on two different processes, so that logs processing, parsing and printing does not slow down the http requests processing.
Processing logs slows down Prism significantly. If you're planning to use the CLI in production (for example in a Docker Container) we recommend to run the CLI with the `-m` flag or set the `NODE_ENV` variable to `production`. In this way, the CLI and the HTTP server will run on two different processes, so that logs processing, parsing and printing does not slow down the http requests processing.
8 changes: 4 additions & 4 deletions docs/guides/multiple-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ reverse_proxy /app_2/* prism_2:4010
```
This configuration will allow access to the first Prism instance on `localhost:8080/app_1` and the second instance on `localhost:8080/app_2` endpoint.
Also, please mind that the provided `nginx.conf` only serves illustrative purposes and hence should not be considered complete nor production-ready.
Also, please mind that the provided `Caddyfile` only serves illustrative purposes and hence should not be considered complete nor production-ready.
## Running the cluster
Expand All @@ -50,15 +50,15 @@ Let's first place the aforementioned files under the same directory - here `pris
```
prism-multi-example
├── docker-compose.yaml
└── nginx.conf
└── Caddyfile
```
With the files in place, you can run (from under `prism-multi-example/`): `docker-compose up`.
After a second, you should be set up with two Prism instances serving different OAS documents.
## Testing the cluster
If you used `nginx.conf` configuration provided in this document, you should now have two endpoints available:
If you used `Caddyfile` configuration provided in this document, you should now have two endpoints available:
```
1. http://localhost:8080/app_1
Expand Down Expand Up @@ -87,7 +87,7 @@ prism_3:
https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml
```

To make the new node accessible from the proxy, please also adjust `nginx.conf`:
To make the new node accessible from the proxy, please also adjust `Caddyfile`:

```
reverse_proxy /app_3/* prism_3:4010
Expand Down

0 comments on commit ea5823a

Please sign in to comment.