Last active
June 22, 2020 20:27
-
-
Save Raduuu/f10997f4df6b8875b968b7d4b50db2ce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Router } from 'express' | |
import controllers from './product.controllers' | |
const router = Router() | |
// /product | |
router | |
.route('/') | |
.get(controllers.getMany) | |
.post(controllers.createOne) | |
// /product/:id | |
router | |
.route('/:id') | |
.get(controllers.getOne) | |
.put(controllers.updateOne) | |
.delete(controllers.removeOne) | |
export default router |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment