first commit

This commit is contained in:
2025-11-26 18:57:18 +03:00
commit 16c21a4e49
41 changed files with 1075 additions and 0 deletions

16
backend/src/config/env.ts Normal file
View File

@@ -0,0 +1,16 @@
import dotenv from "dotenv";
dotenv.config();
export const config = {
port: parseInt(process.env.PORT || "4000", 10),
mongoUri: process.env.MONGO_URI || "mongodb://mongo:27017/wisecoltci",
adminUsername: process.env.ADMIN_USERNAME || "admin",
adminPassword: process.env.ADMIN_PASSWORD || "password",
jwtSecret: process.env.JWT_SECRET || "changeme",
clientOrigin: process.env.CLIENT_ORIGIN || "http://localhost:5173"
};
if (!config.jwtSecret) {
throw new Error("JWT_SECRET is required");
}