parent
0e72128e4e
commit
f434e9191c
4 changed files with 50 additions and 4 deletions
@ -0,0 +1,14 @@ |
|||||||
|
import { SequelizeModuleOptions } from '@nestjs/sequelize'; |
||||||
|
import * as dotenv from "dotenv"; |
||||||
|
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', |
||||||
|
autoLoadModels: true, |
||||||
|
synchronize: true,
|
||||||
|
}; |
Loading…
Reference in new issue