rename infisical token env var

This commit is contained in:
Lee 2023-11-20 15:14:19 +00:00
parent fef36b8210
commit 43bdcfe9e1
2 changed files with 9 additions and 3 deletions

@ -1 +1 @@
INFISCAL_TOKEN=set me INFISICAL_TOKEN=set me

@ -8,15 +8,21 @@ import { createInfisicalClient } from "./util/secrets";
// Load the environment variables // Load the environment variables
dotenv.config(); dotenv.config();
const isValid = checkEnvironmentVariables("INFISCAL_TOKEN"); const isValid = checkEnvironmentVariables("INFISICAL_TOKEN");
if (!isValid) { if (!isValid) {
process.exit(1); process.exit(1);
} }
export const InfisicalClient = createInfisicalClient( export const InfisicalClient = createInfisicalClient(
process.env.INFISCAL_TOKEN! process.env.INFISICAL_TOKEN!
); );
console.log("---");
console.log(
"NOTE: If the infisical secret is invalid, it will say secrets are missing."
);
console.log("If this happens please check the env variable and/or the secret");
console.log("---");
// Load the secrets first so we ensure they are valid before starting the server // Load the secrets first so we ensure they are valid before starting the server
initSecrets().then(async () => { initSecrets().then(async () => {
await connectMongo(); await connectMongo();