add typeorm

This commit is contained in:
João Geonizeli
2022-07-08 17:20:24 -03:00
parent df113c34ee
commit 1ca42be8ae
7 changed files with 401 additions and 114 deletions

View 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: [],
})