@nest-cloud/nest-cloud-starter-nacos-config
v1.0.1
Published
Nestjs Cloud
Downloads
4
Readme
import {
NacosConfigModule,
NacosConfigService,
} from "@nest-cloud/nest-cloud-starter-nacos-config";
@Module({
imports: [
NestConfigModule.forRoot({
isGlobal: true,
useFactory: async (nacosConfigService: NacosConfigService) => {
return nacosConfigService.getConfig();
},
inject: [NacosConfigService],
}),
NacosConfigModule.register(),
],
controllers: [AppController],
providers: [AppService],
})
export class AppModule {}
@Injectable()
export class AppService {
private logger = new Logger(AppService.name);
constructor(private readonly configService: ConfigService) {}
}