I am having problems with this code
const db = mongoskin.db('mongodb://@localhost:27017/test') const id = mongoskin.helper.toObjectID
Node.js POST method
app.post('/collections/:collectionName', (req, res, next) => { pino(req,res); req.log.info('pino output'); req.collection.insert(req.body, {}, (e, results) => { if (e) return next(e) res.send(results.ops) }) })
I was looking at insert documentation but I am struggling to understand .ops.
Whee does it come from?