add project creation and listing
This commit is contained in:
@@ -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: [],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user