feat: add service management module with CRUD operations

This commit is contained in:
nguyenvanbao
2026-02-03 16:20:07 +07:00
parent d1b931d547
commit 9dc02974a4
21 changed files with 3798 additions and 208 deletions

View File

@@ -42,7 +42,21 @@ app.use(
},
express.static(path.join(__dirname, "assets")),
);
app.use("/img", express.static(path.join(process.cwd(), "public/img")));
// Serve static files from public directory (uploads, etc.)
app.use(
"/uploads",
(req, res, next) => {
// Cho phép mọi domain truy cập tài nguyên tĩnh
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Methods", "GET");
next();
},
express.static(path.join(__dirname, "public", "uploads")),
);
// Serve other public files
app.use(express.static(path.join(__dirname, "public")));
// Session configuration
app.use(
session({