Add support for non-default database ports

This commit is contained in:
Isaac 2021-02-26 15:34:06 +00:00
parent 74fa568a7c
commit 52633122c7
No known key found for this signature in database
GPG Key ID: 279D1F53391CED07
2 changed files with 3 additions and 0 deletions

View File

@ -2,6 +2,7 @@ DISCORD_TOKEN=
HTTP_PORT=8080 HTTP_PORT=8080
DB_TYPE=sqlite DB_TYPE=sqlite
DB_HOST= DB_HOST=
DB_PORT=
DB_NAME= DB_NAME=
DB_USER= DB_USER=
DB_PASS= DB_PASS=

View File

@ -12,6 +12,7 @@ module.exports = async (log) => {
const { const {
DB_TYPE, DB_TYPE,
DB_HOST, DB_HOST,
DB_PORT,
DB_USER, DB_USER,
DB_PASS, DB_PASS,
DB_NAME, DB_NAME,
@ -47,6 +48,7 @@ module.exports = async (log) => {
sequelize = new Sequelize(DB_NAME, DB_USER, DB_PASS, { sequelize = new Sequelize(DB_NAME, DB_USER, DB_PASS, {
dialect: types[type].dialect, dialect: types[type].dialect,
host: DB_HOST, host: DB_HOST,
port: DB_PORT,
logging: log.debug logging: log.debug
}); });
} }