From 34c79b08bc59e5cbb21f9669165dcb5a73bb02bd Mon Sep 17 00:00:00 2001 From: Tuan Dang Date: Sun, 23 Apr 2023 13:38:36 +0300 Subject: [PATCH] Update InfisicalClient initialization --- backend/src/config/index.ts | 6 +++++- backend/src/index.ts | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/src/config/index.ts b/backend/src/config/index.ts index 175328caa..e2b52eab3 100644 --- a/backend/src/config/index.ts +++ b/backend/src/config/index.ts @@ -1,4 +1,8 @@ -import infisical from 'infisical-node'; +import InfisicalClient from 'infisical-node'; + +const infisical = new InfisicalClient({ + token: process.env.INFISICAL_TOKEN! +}); export const getPort = async () => await infisical.get('PORT')! || 4000; export const getInviteOnlySignup = async () => await infisical.get('INVITE_ONLY_SIGNUP')! == undefined ? false : await infisical.get('INVITE_ONLY_SIGNUP'); diff --git a/backend/src/index.ts b/backend/src/index.ts index 877a4215d..7aecafe9e 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -79,10 +79,6 @@ import { } from './config'; const main = async () => { - infisical.connect({ - token: process.env.INFISICAL_TOKEN! - }); - TelemetryService.logTelemetryMessage(); setTransporter(await initSmtp());