Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
docs: fix grammar issues in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
NoNameProvided authored Dec 29, 2017
2 parents f5f4ce1 + 89d6568 commit 9b42a52
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -785,13 +785,13 @@ app.listen(3000);

## Using middlewares

You can use any exist express / koa middleware, or create your own.
You can use any existing express / koa middleware, or create your own.
To create your middlewares there is a `@Middleware` decorator,
and to use already exist middlewares there are `@UseBefore` and `@UseAfter` decorators.

### Use exist middleware
### Use existing middleware

There are multiple ways to use middlewares.
There are multiple ways to use middleware.
For example, lets try to use [compression](https://github.com/expressjs/compression) middleware:

1. Install compression middleware: `npm install compression`
Expand Down Expand Up @@ -876,7 +876,7 @@ Here is example of creating middleware for express.js:
}
```

Then you can them this way:
Then you can use them this way:

```typescript
import {Controller, UseBefore} from "routing-controllers";
Expand Down Expand Up @@ -991,7 +991,7 @@ export class LoggingMiddleware implements ExpressMiddlewareInterface {
}
```

To enable this middleware specify it during routing-controllers initialization:
To enable this middleware, specify it during routing-controllers initialization:

```typescript
import "reflect-metadata";
Expand Down Expand Up @@ -1168,7 +1168,7 @@ export class UserController {
If `User` is an interface - then simple literal object will be created.
If its a class - then instance of this class will be created.

This technique works not only with `@Body`, but also with `@Param`, `@QueryParam`, `@BodyParam` and other decorators.
This technique works with `@Body`, `@Param`, `@QueryParam`, `@BodyParam`, and other decorators.
Learn more about class-transformer and how to handle more complex object constructions [here][4].
This behaviour is enabled by default.
If you want to disable it simply pass `classTransformer: false` to createExpressServer method.
Expand Down

0 comments on commit 9b42a52

Please sign in to comment.