251004 frontend backend

This commit is contained in:
admin
2025-10-04 10:56:56 +07:00
parent 10150583cc
commit a70ad11035
1186 changed files with 700 additions and 272 deletions

View File

@@ -2,6 +2,7 @@
import fs from "node:fs";
import express from "express";
import cors from "cors";
import cookieParser from "cookie-parser"; // added
import sql from "./db/index.js";
import healthRouter from "./routes/health.js";
@@ -75,6 +76,10 @@ app.use(
exposedHeaders: ["Content-Disposition", "Content-Length"],
})
);
// parse cookies สำหรับ access_token / refresh_token
app.use(cookieParser()); // added
app.options(
"*",
cors({