Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
indirection42 committed Apr 18, 2024
1 parent c0026d4 commit 87552f7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ Run with `RUSTFLAGS="--cfg tokio_unstable"` to enable [tokio-console](https://gi

- `RUST_LOG`
- Log level. Default: `info`.
- `PORT`
- Override port configuration in config file.
- `LOG_FORMAT`
- Log format. Default: `full`.
- Options: `full`, `pretty`, `json`, `compact`

In addition, you can refer env variables in `config.yml` by using `${env.SOME_ENV}`

## Features

Subway is build with middleware pattern.
Expand Down Expand Up @@ -62,7 +62,7 @@ Subway is build with middleware pattern.
- TODO: Limit batch size, request size and response size.
- TODO: Metrics
- Getting insights of the RPC calls and server performance.

## Benchmarks

To run all benchmarks:
Expand All @@ -82,14 +82,17 @@ cargo bench --bench bench ws_round_trip
This middleware will intercept all method request/responses and compare the result directly with healthy endpoint responses.
This is useful for debugging to make sure the returned values are as expected.
You can enable validate middleware on your config file.

```yml
middlewares:
methods:
- validate
```
NOTE: Keep in mind that if you place `validate` middleware before `inject_params` you may get false positive errors because the request will not be the same.

Ignored methods can be defined in extension config:

```yml
extensions:
validator:
Expand Down

0 comments on commit 87552f7

Please sign in to comment.