mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-10 14:04:51 +02:00
added smpt vars to environment
This commit is contained in:
parent
942dbd8e56
commit
c9d98a8e8c
1 changed files with 17 additions and 0 deletions
|
@ -21,6 +21,19 @@ const environmentSchema = z.object({
|
||||||
.string()
|
.string()
|
||||||
.transform((val) => parseInt(val, 10))
|
.transform((val) => parseInt(val, 10))
|
||||||
.pipe(z.number()),
|
.pipe(z.number()),
|
||||||
|
EMAIL_SMTP_HOST: z.string().optional(),
|
||||||
|
EMAIL_SMTP_PORT: z
|
||||||
|
.string()
|
||||||
|
.optional()
|
||||||
|
.transform((val) => {
|
||||||
|
if (val) {
|
||||||
|
return parseInt(val, 10);
|
||||||
|
}
|
||||||
|
return val;
|
||||||
|
})
|
||||||
|
.pipe(z.number().optional()),
|
||||||
|
EMAIL_SMTP_USER: z.string().optional(),
|
||||||
|
EMAIL_SMTP_PASS: z.string().optional(),
|
||||||
});
|
});
|
||||||
|
|
||||||
const environment = {
|
const environment = {
|
||||||
|
@ -32,6 +45,10 @@ const environment = {
|
||||||
path.join("config"),
|
path.join("config"),
|
||||||
EXTERNAL_PORT: (process.env.EXTERNAL_PORT as string) || "3000",
|
EXTERNAL_PORT: (process.env.EXTERNAL_PORT as string) || "3000",
|
||||||
INTERNAL_PORT: (process.env.INTERNAL_PORT as string) || "3001",
|
INTERNAL_PORT: (process.env.INTERNAL_PORT as string) || "3001",
|
||||||
|
EMAIL_SMTP_HOST: process.env.EMAIL_SMTP_HOST as string,
|
||||||
|
EMAIL_SMTP_PORT: process.env.EMAIL_SMTP_PORT as string,
|
||||||
|
EMAIL_SMTP_USER: process.env.EMAIL_SMTP_USER as string,
|
||||||
|
EMAIL_SMTP_PASS: process.env.EMAIL_SMTP_PASS as string,
|
||||||
};
|
};
|
||||||
|
|
||||||
const parsedConfig = environmentSchema.safeParse(environment);
|
const parsedConfig = environmentSchema.safeParse(environment);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue