Node JS Express MongoDB Найдите все документы

//to get all the products
app.get("/products", async (req, res) => {
  try {
    const allProducts = await Product.find();
    return res.json(allProducts);
  } catch (error) {
    res.json({ message: error });
  }
});
Philan ISithembiso