text: const router = require('express').Router()
  const {Products} = require('../db/models')
  module.exports = router
  
  router.get('/', async (req, res, next) => {
    try {
      const products = await Products.findAll()
  
      res.json(products)
    } catch (err) {
      next(err)
    }
  })
  
  router.get('/:productId', async (req, res, next) => {
    try {
      const singleProduct = await Products.findById(Number(req.params.productId))
      res.json(singleProduct)
    } catch (err) {
      next(err)
    }
  })
  