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-16 01:02:17 +00:00
|
|
|
import { ClientsModule, Transport } from "@nestjs/microservices";
|
2022-06-29 09:23:07 +00:00
|
|
|
|
|
|
|
@Module({
|
|
|
|
imports: [
|
2022-07-16 01:02:17 +00:00
|
|
|
ClientsModule.register([
|
|
|
|
{
|
|
|
|
name: "SERVICIO_NOTIFICACIONES",
|
|
|
|
transport: Transport.TCP,
|
|
|
|
options: {
|
|
|
|
host: "127.0.0.1",
|
|
|
|
port: 3009
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]),
|
2022-06-29 09:23:07 +00:00
|
|
|
MongooseModule.forFeature([{ name: User.name, schema: UserSchema }]),
|
|
|
|
],
|
|
|
|
controllers: [UsersController],
|
|
|
|
providers: [UsersService]
|
|
|
|
})
|
|
|
|
export class UsersModule {}
|