Skip to content

Commit

Permalink
add typeorm to the entity
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaalanMarwan committed Apr 29, 2022
1 parent 1a52935 commit a30c2ce
Show file tree
Hide file tree
Showing 3 changed files with 336 additions and 14 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@
"@nestjs/common": "^7.6.15",
"@nestjs/core": "^7.6.15",
"@nestjs/platform-express": "^7.6.15",
"@nestjs/typeorm": "^8.0.3",
"class-transformer": "^0.5.1",
"class-validator": "^0.13.2",
"pg": "^8.7.3",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^6.6.6",
"rxjs": "^7.5.5",
"typeorm": "^0.3.6",
"uuid": "^8.3.2"
},
"devDependencies": {
Expand Down
16 changes: 14 additions & 2 deletions src/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
import { Module } from '@nestjs/common';
import { TasksModule } from './tasks/tasks.module';

import { TypeOrmModule } from '@nestjs/typeorm';
@Module({
imports: [TasksModule],
imports: [
TasksModule,
TypeOrmModule.forRoot({
type: 'postgres',
host: 'localhost',
port: 5432,
username: 'postgres',
password: 'postgres',
database: 'task-management',
autoLoadEntities: true,
synchronize: true,
}),
],
})
export class AppModule {}
Loading

0 comments on commit a30c2ce

Please sign in to comment.