Skip to content

Instantly share code, notes, and snippets.

@adsonrocha
Last active October 22, 2019 22:50
Show Gist options
  • Save adsonrocha/58c2c908054cde485e1f50dc39387c02 to your computer and use it in GitHub Desktop.
Save adsonrocha/58c2c908054cde485e1f50dc39387c02 to your computer and use it in GitHub Desktop.
Mongoose no NestJS
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { UserModule } from './user/user.module';
import { MongooseModule } from '@nestjs/mongoose';
@Module({
imports: [
MongooseModule.forRoot('mongodb+srv://adsonrocha:<password>@cluster0-5efft.mongodb.net/test?retryWrites=true&w=majority'),
UserModule,
],
controllers: [AppController],
providers: [AppService],
})
export class AppModule {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment