-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(fastify): implemets FastifyInterceptorService for OgmaInterceptor
Pretty much just like the ExpressInterceptorService, but for Fastify.
- Loading branch information
Showing
3 changed files
with
24 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
# `@ogma/platform-fastify` | ||
|
||
> TODO: description | ||
The `FastifyInterceptorService` parser for the `OgmaInterceptor`. This plugin class parses Fastify request and response object to be able to successfully log the data about the request. For more information, check out [the @ogma/nestjs-module](packages/nestjs-module/README.md) documentation. | ||
|
||
## Installation | ||
|
||
Nothing special, standard `npm i @ogma/platform-fastify` or `yarn add @ogma/platform-fastify` | ||
|
||
## Usage | ||
|
||
``` | ||
const platformFastify = require('@ogma/platform-fastify'); | ||
This plugin is to be used in the `OgmaInterceptorOptions` portion of the `OgmaModule` during `forRoot` or `forRootAsync` registration. It can be used like so: | ||
|
||
// TODO: DEMONSTRATE API | ||
```ts | ||
@Module( | ||
OgmaModule.forRoot({ | ||
interceptor: { | ||
http: FastifyInterceptorService | ||
} | ||
}) | ||
) | ||
export class AppModule {} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters