Configuration
Overview
Configuration reference for Nest Graph Inspector.
Nest Graph Inspector is configured through the forRoot or forRootAsync static methods on the NestGraphInspector module.
Config Shape
export type NestGraphInspectorOutput =
| { type: 'markdown'; path: string }
| { type: 'json'; path: string }
| { type: 'http'; path?: string }
| { type: 'viewer'; origin: string; path?: string };
export interface NestGraphInspectorModuleOptions {
/**
* Which "Root" of module that need to be inspect
*/
rootModule?: Type;
/**
* type definition of output
*/
outputs?: NestGraphInspectorOutput[];
}
Full Example
root.module.ts
import { Module } from '@nestjs/common';
import { NestGraphInspector } from 'nest-graph-inspector';
@Module({
imports: [
NestGraphInspector.forRoot({
outputs: [
{
type: 'viewer',
origin: 'http://localhost:9999'
}
]
}),
],
})
export class RootModule {}
