You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
475 B
16 lines
475 B
5 years ago
|
import { ConnectionOptions } from "typeorm"
|
||
|
import { User } from "./userResolver/User"
|
||
|
|
||
|
export const connectionOptions = (): ConnectionOptions => ({
|
||
|
type: "postgres",
|
||
|
host: process.env.DB_HOST as string,
|
||
|
port: parseInt(process.env.DB_PORT as string),
|
||
|
database: process.env.DB_NAME as string,
|
||
|
username: process.env.DB_USER as string,
|
||
|
password: process.env.DB_PASS as string,
|
||
|
entities: [User],
|
||
|
dropSchema: false,
|
||
|
synchronize: false,
|
||
|
logging: false,
|
||
|
})
|