From 16d50473794234ee978f5043ee17d32eb2c73303 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sat, 20 Nov 2021 15:19:25 +0000 Subject: [PATCH] Server: Perform storage checks before starting services --- packages/server/src/app.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/server/src/app.ts b/packages/server/src/app.ts index ea145b268f..044680a2c4 100644 --- a/packages/server/src/app.ts +++ b/packages/server/src/app.ts @@ -288,9 +288,6 @@ async function main() { appLogger().info('Skipped database auto-migration.'); } - appLogger().info('Starting services...'); - await startServices(ctx.joplinBase.services); - appLogger().info('Performing main storage check...'); appLogger().info(await storageConnectionCheck(config().storageDriver, ctx.joplinBase.db, ctx.joplinBase.models)); @@ -299,6 +296,9 @@ async function main() { appLogger().info(await storageConnectionCheck(config().storageDriverFallback, ctx.joplinBase.db, ctx.joplinBase.models)); } + appLogger().info('Starting services...'); + await startServices(ctx.joplinBase.services); + appLogger().info(`Call this for testing: \`curl ${config().apiBaseUrl}/api/ping\``); app.listen(config().port);