katoikia-app/servicio-foro-comunicaciones/src/app.module.ts

25 lines
729 B
TypeScript
Raw Normal View History

2022-07-01 01:44:10 +00:00
import { Module } from '@nestjs/common';
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({
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 {}