katoikia-app/servicio-usuarios/src/users/users.module.ts

37 lines
932 B
TypeScript
Raw Normal View History

2022-06-29 09:23:07 +00:00
import { Module } from '@nestjs/common';
import { UsersService } from './users.service';
import { MongooseModule } from '@nestjs/mongoose';
import { UsersController } from './users.controller';
import { User, UserSchema } from '../schemas/user.schema';
2022-07-25 04:38:48 +00:00
import { ClientsModule, Transport } from '@nestjs/microservices';
2022-06-29 09:23:07 +00:00
@Module({
imports: [
ClientsModule.register([
{
2022-07-25 04:38:48 +00:00
name: 'SERVICIO_NOTIFICACIONES',
transport: Transport.TCP,
options: {
2022-07-25 04:38:48 +00:00
host: '127.0.0.1',
port: 3009,
},
},
]),
ClientsModule.register([
{
name: "SERVICIO_COMUNIDADES",
transport: Transport.TCP,
options: {
host: "127.0.0.1",
port: 3002
}
}
]),
2022-06-29 09:23:07 +00:00
MongooseModule.forFeature([{ name: User.name, schema: UserSchema }]),
],
controllers: [UsersController],
2022-07-25 04:38:48 +00:00
providers: [UsersService],
2022-06-29 09:23:07 +00:00
})
export class UsersModule {}