Skip to content

Commit

Permalink
Ensure read model is up to date at application start #59
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Haarhoff committed Aug 7, 2024
1 parent 466ffe5 commit ea5edcf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ void (async () => {
TE.mapLeft(e => deps.logger.error(e, 'Failed to start server'))
)();

await deps.sharedReadModel.asyncRefresh()();

server.listen(conf.PORT, () => {
deps.logger.info({port: conf.PORT}, 'Server listening');
if (conf.PUBLIC_URL.includes('localhost')) {
Expand Down

0 comments on commit ea5edcf

Please sign in to comment.