Skip to content

Commit adf95d0

Browse files
committed
Setup local & production env config
1 parent f8991e8 commit adf95d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

backend/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import express from "express";
99
import { FileType } from "types";
1010
import { slugify } from "utils/slugify";
1111

12-
dotenv.config();
12+
const env = process.env.NODE_ENV || "local"; // "production" or "local"
13+
dotenv.config({ path: `.env.${env}` });
1314

1415
export const API_BASE = process.env.API_BASE;
1516

0 commit comments

Comments
 (0)