import { Module } from '@nestjs/common'; import { CommunitiesService } from './communities.service'; import { CommunitiesController } from './communities.controller'; import { MongooseModule } from '@nestjs/mongoose'; import { ClientsModule, Transport } from '@nestjs/microservices'; import { Community, CommunitySchema } from '../schemas/community.schema'; @Module({ imports: [ ClientsModule.register([ { name: 'SERVICIO_USUARIOS', transport: Transport.TCP, options: { host: '127.0.0.1', port: 3001, }, }, ]), ClientsModule.register([ { name: 'SERVICIO_AREAS_COMUNES', transport: Transport.TCP, options: { host: '127.0.0.1', port: 3003, }, }, ]), ClientsModule.register([ { name: 'SERVICIO_RESERVACIONES', transport: Transport.TCP, options: { host: '127.0.0.1', port: 3006, }, }, ]), MongooseModule.forFeature([ { name: Community.name, schema: CommunitySchema }, ]), ], controllers: [CommunitiesController], providers: [CommunitiesService], }) export class CommunitiesModule {}