Better error message on postgresql connection err
This commit is contained in:
parent
cf649c2ed9
commit
4f24f16e27
|
@ -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) {
|
async function initDatabaseModels (silent: boolean) {
|
||||||
sequelizeTypescript.addModels([
|
sequelizeTypescript.addModels([
|
||||||
ApplicationModel,
|
ApplicationModel,
|
||||||
|
|
Loading…
Reference in New Issue