began to refactor backend

This commit is contained in:
2025-11-05 10:25:23 +01:00
parent 3e67bf9052
commit 27d21efefa
12 changed files with 141 additions and 0 deletions

View File

@@ -1,11 +1,15 @@
import express from "express";
import cors from "cors";
import env from "dotenv";
import loansMgmtRouter from "./routes/app/loanMgmt.route.js";
import userMgmtRouter from "./routes/app/userMgmt.route.js";
env.config();
const app = express();
const port = 8002;
app.use(cors());
app.use("/api/loans", loansMgmtRouter);
app.use("/api/users", userMgmtRouter);
// Increase body size limits to support large CSV JSON payloads
app.use(express.urlencoded({ extended: true, limit: "10mb" }));
app.set("view engine", "ejs");