peter@yahoo.com'
})
.end(function(e, res) {
expect(e).to.eql(null...根据ID取得对象信息
app.get('/collections/:collectionName/:id', function(req, res, next) {
req.collection.findById...(req.params.id, function(e, result){
if (e) return next(e)
res.send(result)
})
})
重启、测试,结果:...app.put('/collections/:collectionName/:id', function(req, res, next) {
req.collection.updateById(req.params.id...app.del('/collections/:collectionName/:id', function(req, res, next) {
req.collection.removeById(req.params.id