Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hsndmr/cappadocia-viewer-for-nestjs
It is a debugger used to view request and response data in NestJS applications
https://github.com/hsndmr/cappadocia-viewer-for-nestjs
Last synced: about 1 month ago
JSON representation
It is a debugger used to view request and response data in NestJS applications
- Host: GitHub
- URL: https://github.com/hsndmr/cappadocia-viewer-for-nestjs
- Owner: hsndmr
- Created: 2023-09-23T16:50:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-23T16:53:50.000Z (over 1 year ago)
- Last Synced: 2023-12-26T12:12:54.180Z (about 1 year ago)
- Language: TypeScript
- Size: 254 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cappadocia Viewer for NestJS
Cappadocia Viewer for NestJS is a debugger used to view request and response data in NestJS applications.
# Installation
Before debugging your NestJS app, it is essential to install the Cappadocia Viewer desktop app, which allows you to debug your NestJS app. To get the Cappadocia Viewer desktop app, visit the [releases page](https://github.com/hsndmr/cappadocia-viewer/releases/tag/0.1.0)
and download the app.After installing the Cappadocia Viewer desktop app, you can install the Cappadocia Viewer for NestJS package using npm.
```bash
npm i cappadocia-viewer-for-nestjs -D
```You can debug requests using the `CappadociaViewerInterceptor` interceptor method.
```typescript
const app = await NestFactory.create(AppModule);const isDevelopmentEnvironment = true;
if (isDevelopmentEnvironment) {
const { CappadociaViewerInterceptor } = await import(
'cappadocia-viewer-for-nestjs'
);app.useGlobalInterceptors(new CappadociaViewerInterceptor());
}
await app.listen(3000);
```After adding it, you can see requests in the Cappadocia Viewer app. Moreover, you can change the `isDevelopmentEnvironment` variable using the config value.