diff --git a/src/app.module.ts b/src/app.module.ts index 8662803..75987c4 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -1,9 +1,21 @@ import { Module } from '@nestjs/common'; import { AppController } from './app.controller'; import { AppService } from './app.service'; +import { TypeOrmModule } from '@nestjs/typeorm'; @Module({ - imports: [], + imports: [ + TypeOrmModule.forRoot({ + type: 'mysql', + host: 'localhost', + port: 3306, + username: 'root', + password: 'jeremy', + database: 'nest', + synchronize: true, + entities: [__dirname + '/**/*.entity{.ts,.js}'], + }), + ], controllers: [AppController], providers: [AppService], })