began to refactor backend
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user