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.
17 lines
592 B
17 lines
592 B
import { SequelizeModuleOptions } from "@nestjs/sequelize"; |
|
import * as dotenv from "dotenv"; |
|
import * as path from "path"; |
|
|
|
dotenv.config(); |
|
|
|
export const databaseConfig: SequelizeModuleOptions = { |
|
dialect: "postgres", |
|
host: process.env.DATABASE_HOST || "localhost", |
|
port: +process.env.DATABASE_PORT || 5432, |
|
username: process.env.DATABASE_USER || "postgres", |
|
password: process.env.DATABASE_PASSWORD || "password", |
|
database: process.env.DATABASE_NAME || "ecommerce", |
|
models: [path.join(__dirname, "../**/entities/*.entity.ts")], |
|
autoLoadModels: true, |
|
synchronize:true, |
|
};
|
|
|