add typeorm
This commit is contained in:
16
server/src/infra/dataSource.ts
Normal file
16
server/src/infra/dataSource.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import "reflect-metadata"
|
||||
import { DataSource } from "typeorm"
|
||||
import { User } from "../entity/user.entity";
|
||||
|
||||
export const AppDataSource = new DataSource({
|
||||
type: "postgres",
|
||||
host: "localhost",
|
||||
port: 5432,
|
||||
username: "joao",
|
||||
database: "todoListDev",
|
||||
synchronize: true,
|
||||
logging: false,
|
||||
entities: [User],
|
||||
migrations: [],
|
||||
subscribers: [],
|
||||
})
|
||||
Reference in New Issue
Block a user