Read db password from env

This commit is contained in:
2025-01-14 20:22:59 -05:00
parent 4a3ce70751
commit c83b7535c1
3 changed files with 4 additions and 2 deletions

View File

@@ -48,7 +48,7 @@ class DB {
private sequelize: Sequelize;
constructor(config: DBConfig = {}) {
this.sequelize = new Sequelize(config.db || 'archery', config.user || 'archery', config.password || '', {
this.sequelize = new Sequelize(config.db || 'archery', config.user || 'archery', process.env.PASSWORD || config.password || '', {
host: config.host || 'localhost',
port: config.port || 5432,
dialect: 'postgres'