Shows: configure mongoose schema
This commit is contained in:
parent
916d3fd6ba
commit
4a13b2a50e
2 changed files with 11 additions and 0 deletions
|
|
@ -1,8 +1,19 @@
|
|||
import { Module } from '@nestjs/common';
|
||||
import { ShowsService } from './shows.service';
|
||||
import { ShowsController } from './shows.controller';
|
||||
import { MongooseModule } from '@nestjs/mongoose';
|
||||
import { ShowSchema } from './schema/show.schema';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
MongooseModule.forFeature([
|
||||
{
|
||||
name: 'Show',
|
||||
schema: ShowSchema,
|
||||
collection: 'shows',
|
||||
},
|
||||
]),
|
||||
],
|
||||
controllers: [ShowsController],
|
||||
providers: [ShowsService],
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue