You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fs.readFile('db.json', 'utf8', (err, data) => {
if (err) {
console.error(err);
res.status(500).send('Internal Server Error');
return;
}
make sure you have this code structured properly
i try many times this "http://localhost:3000/Products?q=mobile" but this not working so anyone pls help
and my db.json file this
"Products": [
{
"productName": "Boat ",
"price": "2999",
"color": "black",
"category": "watch",
"description": "good watch for personal use",
"productUrl": "https://images-na.ssl-images-amazon.com/images/I/418liDrUObL.SX320_QL100_AC_SCLZZZZZZZ.jpg",
"id": "4169"
},
{
"id": "be25",
"productName": "iphone 15",
"price": "79999",
"color": "white",
"category": "mobile",
"description": "good smart mobile",
"productUrl": "https://m.media-amazon.com/images/W/MEDIAX_849526-T2/images/I/71PjpS59XLL.AC_SR360,240_QL70.jpg"
},
{
"productName": "samsung galaxy",
"price": "2000",
"color": "green",
"category": "mobile",
"description": "good mobile phone",
"productUrl": "https://m.media-amazon.com/images/W/MEDIAX_849526-T2/images/I/818VqDSKpCL.AC_UY436_FMwebp_QL65.jpg",
"id": "fe0b"
}
]
The text was updated successfully, but these errors were encountered: