Created
October 22, 2019 23:37
-
-
Save adsonrocha/0e46e0a920c649c7dba1c664e714949a to your computer and use it in GitHub Desktop.
User Module importing Mongoose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Module } from '@nestjs/common'; | |
import { UserService } from './user.service'; | |
import { UserController } from './user.controller'; | |
import { MongooseModule } from '@nestjs/mongoose'; | |
import { UserSchema } from './user.model'; | |
@Module({ | |
imports: [ | |
MongooseModule.forFeature([{ | |
name: 'User', schema: UserSchema, | |
}]), | |
], | |
providers: [UserService], | |
controllers: [UserController], | |
}) | |
export class UserModule { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment