nestjs-ctrip-apollo-client
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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 {}

Readme

Keywords

Package Sidebar

Install

npm i nestjs-ctrip-apollo-client

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

26.2 kB

Total Files

15

Last publish

Collaborators

  • chf007