2022-07-01 01:44:10 +00:00
|
|
|
import { Module } from '@nestjs/common';
|
2022-07-01 20:53:38 +00:00
|
|
|
import { MongooseModule } from '@nestjs/mongoose';
|
|
|
|
import { ClientsModule, Transport } from "@nestjs/microservices";
|
|
|
|
import { PostsModule } from './posts/posts.module';
|
|
|
|
import { PostCommentsModule } from './post-comments/post-comments.module';
|
2022-07-01 01:44:10 +00:00
|
|
|
|
|
|
|
@Module({
|
2022-07-01 20:53:38 +00:00
|
|
|
imports: [ ClientsModule.register([
|
|
|
|
{
|
|
|
|
name: "SERVICIO_POSTS",
|
|
|
|
transport: Transport.TCP,
|
|
|
|
options: {
|
|
|
|
host: "127.0.0.1",
|
|
|
|
port: 3007
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]),
|
|
|
|
MongooseModule.forRoot(`mongodb+srv://proyecto_4:proyecto_4@proyecto4.yv4fb.mongodb.net/servicio_posts?retryWrites=true&w=majority`),
|
|
|
|
PostsModule,
|
|
|
|
PostCommentsModule],
|
|
|
|
controllers: [],
|
|
|
|
providers: [],
|
2022-07-01 01:44:10 +00:00
|
|
|
})
|
|
|
|
export class AppModule {}
|