Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ioredis.md #2414

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/tutorials/ioredis.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ meta:

## Features

Currently, `@tsed/ioredis` allows you:
Currently, `@tsed/ioredis` allows you to:

- Configure one or more Redis database connections via the `@Configuration` configuration.
- Share redis connection with `@tsed/platform-cache`.
- Share Redis connection with `@tsed/platform-cache`.
- Support classic Redis connection and Cluster connection.
- Inject connection to another service.
- Mock connection for unit/integration test.
Expand Down Expand Up @@ -53,7 +53,7 @@ registerConnectionProvider({

::: tip Note

`registerConnectionProvider` create automatically an injectable `RedisConnection`.
`registerConnectionProvider` creates automatically an injectable `RedisConnection`.

:::

Expand All @@ -68,7 +68,7 @@ import "@tsed/ioredis";
ioredis: [
{
name: "default",
// share the redis connection with @tsed/platform-cache
// share the Redis connection with @tsed/platform-cache
cache: true

// redis options
Expand Down Expand Up @@ -117,7 +117,7 @@ import "@tsed/ioredis";
ioredis: [
{
name: "default",
// share the redis connection with @tsed/platform-cache
// share the Redis connection with @tsed/platform-cache
cache: true,
// cluster options
nodes: ["..."],
Expand Down Expand Up @@ -191,7 +191,7 @@ class MyModule {}
Ts.ED provides a utility that allows you to test a service that consumes a Redis connection.
This use relies on the awesome [ioredis-mock](https://www.npmjs.com/package/ioredis-mock) module.

Here is a class that consume a redis connection:
Here is a class that consumes a Redis connection:

```typescript
import {v4} from "uuid";
Expand Down Expand Up @@ -239,7 +239,7 @@ export class ClientModel {
}
```

And his test:
And its test:

```typescript
import {ClientRepository} from "./ClientRepository";
Expand Down
Loading