Adding a route

The first thing we need to update in order to add this new functionality is the main routes list. Here, we will add a new endpoint that handles the delete function and points to a function within the image controller. Edit the server/routes.js file and insert the following new line of code:

router.delete('/images/:image_id', image.remove);
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.247.125