I want to delete an image saved in my project directory, in my mern app. For that I used fs.unlink().
fs.unlink()
Photo.findByIdAndDelete(req.body.photoId)