nestjs-ctrip-apollo-client
v1.0.1
Published
NestJS Module for Ctrip Apollo
Downloads
4
Readme
NestJS CtripApolloClientModule
携程 Apollo 配置中心 NestJS 客户端,基于node-apollo-client封装。
安装
npm install nestjs-ctrip-apollo-client
使用
import { Module } from '@nestjs/common';
import { CtripApolloClientModule } from 'nestjs-ctrip-apollo-client';
@Module({
imports: [
CtripApolloClientModule.register({
configServerUrl: 'http://xxx.xxx.xxx.xxx',
appId: 'my-app',
cluster: 'default',
namespaces: ['application'],
initialConfigs: {},
listenOnNotification: true,
fetchCacheInterval: 5 * 60e3,
cachedConfigFilePath: '/tmp',
}),
],
providers: [],
})
export class AppModule {}