search bar now working

This commit is contained in:
Mann Patel
2025-03-29 17:28:09 -06:00
parent 91ec43627a
commit 2e77ef49f4
12 changed files with 687 additions and 71 deletions

14
backend/routes/search.js Normal file
View File

@@ -0,0 +1,14 @@
// routes/product.js
const express = require("express");
const { searchProductsByName } = require("../controllers/search");
const router = express.Router();
// Add detailed logging middleware
router.use((req, res, next) => {
console.log(`Incoming ${req.method} request to ${req.path}`);
next();
});
router.get("/search", searchProductsByName);
module.exports = router;