1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| import { Module } from '@nestjs/common'; import { AppController } from './app.controller'; import { AppService } from './app.service'; import { ArticleModule } from './modules/article/article.module'; import { TypeOrmModule } from '@nestjs/typeorm'
@Module({ imports: [ TypeOrmModule.forRoot({ type: 'mysql', host: 'localhost', port: 3306, username: 'root', password: 'root', database: 'test', entities: ["dist/modules/**/*.entity{.ts,.js}"], synchronize: true, }), ArticleModule ], controllers: [AppController], providers: [AppService], })
export class AppModule {}
|