Update index.js
This commit is contained in:
@@ -35,8 +35,8 @@ const upload = multer({ storage: storage });
|
|||||||
|
|
||||||
app.use(cors());
|
app.use(cors());
|
||||||
app.use(express.json());
|
app.use(express.json());
|
||||||
// Serve uploaded files statically
|
// Serve uploaded files statically at /api/uploads to match the frontend request path passed via Nginx
|
||||||
app.use('/uploads', express.static(uploadDir));
|
app.use('/api/uploads', express.static(uploadDir));
|
||||||
|
|
||||||
// --- HELPER FUNCTIONS ---
|
// --- HELPER FUNCTIONS ---
|
||||||
const safeJsonParse = (val, fallback) => {
|
const safeJsonParse = (val, fallback) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user