@orderlycode/nest-tools
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

nest-tool

nestjs 개발시 도움될만한 것들을 모아둠

세팅법

  1. AppModule 안에 CommonModule을 등록한다.
@Module({
  imports: [
    // ...
    CommonModule
  ],
  // ...
})
export class AppModule {
}

// 같은 Reqeust내에서 context를 추가하고 싶다면 아래와 같이 사용한다.
// 이 경우, Logger에서 항상 해당 내용을 추가하며, 다른 곳에서 request scope 전역변수로 쓸 수 있다.
Context.set("test", 1)
Context.get("test") // 1
  1. App 생성시 logger에 new NestLoggerService()를 등록한다.
const app = await NestFactory.create(AppModule, {
  logger: new NestLoggerService(),
});

Readme

Keywords

none

Package Sidebar

Install

npm i @orderlycode/nest-tools

Weekly Downloads

29

Version

0.1.1

License

ISC

Unpacked Size

23.5 kB

Total Files

20

Last publish

Collaborators

  • inithink