aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/initializers/database.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/initializers/database.ts b/server/initializers/database.ts
index 8ce32f6fa..5cf5765f6 100644
--- a/server/initializers/database.ts
+++ b/server/initializers/database.ts
@@ -75,6 +75,14 @@ const sequelizeTypescript = new SequelizeTypescript({
75 } 75 }
76}) 76})
77 77
78sequelizeTypescript.authenticate()
79 .then(() => logger.debug('Connection to PostgreSQL has been established successfully.'))
80 .catch(err => {
81
82 logger.error('Unable to connect to PostgreSQL database.', { err })
83 process.exit(-1)
84 })
85
78async function initDatabaseModels (silent: boolean) { 86async function initDatabaseModels (silent: boolean) {
79 sequelizeTypescript.addModels([ 87 sequelizeTypescript.addModels([
80 ApplicationModel, 88 ApplicationModel,