Skip to content

Commit

Permalink
chore: allow using db watchers in localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
sampaiodiego committed Aug 21, 2024
1 parent 2b13061 commit 335a004
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/core-services/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,11 @@ export {
IUserService,
};

const disabledEnvVar = String(process.env.DISABLE_DB_WATCHERS).toLowerCase();

export const dbWatchersDisabled =
['yes', 'true'].includes(String(process.env.DISABLE_DB_WATCHERS).toLowerCase()) || process.env.NODE_ENV !== 'production';
(process.env.NODE_ENV === 'production' && ['yes', 'true'].includes(disabledEnvVar)) ||
(process.env.NODE_ENV !== 'production' && !['no', 'false'].includes(disabledEnvVar));

// TODO think in a way to not have to pass the service name to proxify here as well
export const Authorization = proxifyWithWait<IAuthorization>('authorization');
Expand Down

0 comments on commit 335a004

Please sign in to comment.