nestjs-apollo-client
v1.3.0
Published
[![Build Status](https://github.com/zman2013/nestjs-apollo-client/workflows/Build%20and%20Release/badge.svg)](https://github.com/zman2013/nestjs-apollo-client/workflows/Build%20and%20Release/badge.svg) [![Coverage Status](https://coveralls.io/repos/github
Downloads
393
Readme
nestjs-apollo-client
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
) {}
...
}