Skip to content

Commit 55d655d

Browse files
committed
chore: update config
1 parent 9cff4ed commit 55d655d

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

configuration.ts

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,12 @@ type Configuration = {
1515
};
1616
};
1717

18-
const DOT_ENV_PATH = process.env.DOT_ENV_PATH;
19-
20-
if (DOT_ENV_PATH) {
21-
const buffer = fs.readFileSync(path.join(process.cwd(), DOT_ENV_PATH));
18+
if (process.env.DOT_ENV_PATH) {
19+
const dotenvPath = path.join(process.cwd(), process.env.DOT_ENV_PATH);
20+
const buffer = fs.readFileSync(dotenvPath);
2221
const defaultConfig = dotenv.parse(buffer);
23-
2422
Object.entries(defaultConfig).forEach(([key, value]) => {
25-
if (!process.env[key]) {
26-
process.env[key] = value;
27-
}
23+
if (!process.env[key]) process.env[key] = value;
2824
});
2925
}
3026

@@ -41,11 +37,11 @@ const configurationSchema = z.object({
4137
});
4238

4339
const configuration: Configuration = {
44-
appUrl: process.env.APP_URL,
40+
appUrl: process.env.APP_URL as string,
4541
zitadel: {
46-
url: process.env.ZITADEL_URL,
47-
userId: process.env.ZITADEL_SERVICE_USER_ID,
48-
userToken: process.env.ZITADEL_SERVICE_USER_TOKEN,
42+
url: process.env.ZITADEL_URL as string,
43+
userId: process.env.ZITADEL_SERVICE_USER_ID as string,
44+
userToken: process.env.ZITADEL_SERVICE_USER_TOKEN as string,
4945
},
5046
resend: {
5147
apiKey: process.env.RESEND_API_KEY,

0 commit comments

Comments
 (0)