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

27 lines
727 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,
},
},
]),
2022-07-25 04:38:48 +00:00
MongooseModule.forFeature([{ name: User.name, schema: UserSchema }]),
2022-06-29 09:23:07 +00:00
],
controllers: [UsersController],
2022-07-25 04:38:48 +00:00
providers: [UsersService],
2022-06-29 09:23:07 +00:00
})
export class UsersModule {}