add project creation and listing

This commit is contained in:
João Geonizeli
2022-07-09 10:05:01 -03:00
parent c3fe6e6f1c
commit e0dd6c2307
27 changed files with 256 additions and 26 deletions

View File

@@ -1,16 +1,20 @@
import "reflect-metadata"
import { DataSource } from "typeorm"
import * as dotenv from 'dotenv';
import "reflect-metadata";
import { DataSource } from "typeorm";
import { Project } from "../entity/project.entity";
import { User } from "../entity/user.entity";
dotenv.config();
export const AppDataSource = new DataSource({
type: "postgres",
host: "localhost",
port: 5432,
username: "joao",
database: "todoListDev",
database: process.env.DB_NAME,
synchronize: true,
logging: false,
entities: [User],
entities: [User, Project],
migrations: [],
subscribers: [],
})