应该是
$.ajax({
type: 'DELETE',
url: '/admin/list?id=' + id
})
吧
$.ajax({
type: 'DELETE',
url: '/admin/list?id=' + id
})
吧
2016-05-04
TypeError: Cannot read property '_id' of undefined
at D:\imooc\app.js:78:25
at Layer.handle [as handle_request] (D:\imooc\node_modules\express\lib\router\layer.js:95:5)
at next (D:\imooc\node_modules\express\lib\router\route.js:131:13)
at D:\imooc\app.js:78:25
at Layer.handle [as handle_request] (D:\imooc\node_modules\express\lib\router\layer.js:95:5)
at next (D:\imooc\node_modules\express\lib\router\route.js:131:13)
2016-05-03
需要先在本机安装好MongoDB,并且已经把环境变量设置好了,并且mongodb的服务已经启动了,才能直接在命令行输入mongo连接mongodb操作数据库。而且node app.js的时候,也必须是mongoDB的服务已经启动了,不然会报错。
2016-04-25