1.3.0 • Published 3 years ago

nestjs-apollo-client v1.3.0

Weekly downloads
1
License
MIT
Repository
-
Last release
3 years ago

nestjs-apollo-client

Build Status Coverage Status npm

A nestjs module implementation of a client for Apollo(https://github.com/ctripcorp/apollo), the reliable configuration management system.

This module is registered in the global scope.

Usage

npm install nestjs-apollo-client 

example1

// app.module.ts
// refresh config every 10_000 milliseconds
@Module({
  imports: [ApolloModule.forRootAsync(new Meta("http://xxx", "appId"), 10_000)]
})
export class AppModule {}

// app.controller.ts
@Controller()
export class AppController {
  constructor(private readonly appService: AppService,
      private readonly _apolloService: ApolloService
    ) {}
  ...
}

Github

https://github.com/zman2013/nestjs-apollo-client