diff --git a/.env.example b/.env.example index 6331415..4364026 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,5 @@ NODE_ENV= PORT= MONGO_URI= -JWT_SECRET= \ No newline at end of file +JWT_SECRET= +API_URL= \ No newline at end of file diff --git a/src/config/env.ts b/src/config/env.ts index a3aa3c4..fd4f114 100644 --- a/src/config/env.ts +++ b/src/config/env.ts @@ -15,6 +15,7 @@ function requireEnv(key: string): string { export const env = { nodeEnv: process.env.NODE_ENV ?? "development", port: Number(process.env.PORT) ?? 3000, + API_URL: process.env.API_URL ?? "http://localhost:3000", mongoUri: requireEnv("MONGO_URI"),