Skip to content

Instantly share code, notes, and snippets.

@gumbarros
Last active February 8, 2022 16:34
Show Gist options
  • Save gumbarros/557ee856f9fb3323a1b7df00766a4f72 to your computer and use it in GitHub Desktop.
Save gumbarros/557ee856f9fb3323a1b7df00766a4f72 to your computer and use it in GitHub Desktop.
Router Example
router.route("/products/:id?")
.get( (request, response) => ProductController.getProductById(request, response))
.post( (request,response) => ProductController.newProduct(request, response))
.patch( async (request, response) => await ProductController.updateProductById(request, response))
.delete( (request, response) => ProductController.deleteProductById(request, response));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment