how to write code to delete a file from public folder server in express js code example
Example: delete with unlinksync node
const fs = require('fs')
const path = './file.txt'
try {
fs.unlinkSync(path)
//file removed
} catch(err) {
console.error(err)
}