mirror of
https://github.com/pieartsy/PluralFlux.git
synced 2026-04-16 17:45:28 +10:00
add typeORM initial files
This commit is contained in:
21
database/data-source.ts
Normal file
21
database/data-source.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import "reflect-metadata"
|
||||
import { DataSource } from "typeorm"
|
||||
import { Member } from "./entity/Member"
|
||||
import { System } from "./entity/System"
|
||||
import * as env from 'dotenv';
|
||||
|
||||
env.config();
|
||||
|
||||
export const AppDataSource = new DataSource({
|
||||
type: "postgres",
|
||||
host: "localhost",
|
||||
port: 5432,
|
||||
username: "postgres",
|
||||
password: process.env.POSTGRES_PASSWORD,
|
||||
database: "postgres",
|
||||
synchronize: true,
|
||||
logging: false,
|
||||
entities: [Member, System],
|
||||
migrations: [],
|
||||
subscribers: [],
|
||||
})
|
||||
Reference in New Issue
Block a user