Verified Commit 4f24f16e authored by Chocobozzz's avatar Chocobozzz
Browse files

Better error message on postgresql connection err

parent cf649c2e
......@@ -75,6 +75,14 @@ const sequelizeTypescript = new SequelizeTypescript({
}
})
sequelizeTypescript.authenticate()
.then(() => logger.debug('Connection to PostgreSQL has been established successfully.'))
.catch(err => {
logger.error('Unable to connect to PostgreSQL database.', { err })
process.exit(-1)
})
async function initDatabaseModels (silent: boolean) {
sequelizeTypescript.addModels([
ApplicationModel,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment