const database = new datastore({ filename: './database.db', autoload: true });
app.delete('/delete/:key',(request,response)=>{
const param = request.params.key
console.log(param)
database.remove({key:param},{})
})
我从前端获得了正确的参数值。但是database.db文件中没有任何变化
database.db文件
{"task":"travel","checked":false,"key":1575483080551,"_id":"DyPPtRccllHb3xt2"}
{"task":"laksh","checked":false,"key":1575483067807,"_id":"wCudlggNZJk4o00W"}
{"task":"hello world","checked":false,"key":1575528880099,"_id":"wtOcryJKAV0uqhXh"}