var settings = require('../settings'), Db = require('mongodb').Db, Connection = require('mongodb').Connection, Server = require('mongodb').Server; module.exports = new Db(settings.db, new Server(settings.host, settings.port), {safe: true});
我在这段代码中有几个不懂点。。
Db = require('mongodb').Db和Connection = require('mongodb').Connection和Server = require('mongodb').Server和new Db(settings.db, new Server(settings.host, settings.port), {safe: true})它们的作用是干什么的???求助。麻烦知道的给解答下。谢谢!
相关分类