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})它们的作用是干什么的???求助。麻烦知道的给解答下。谢谢!
2 回答
- 2 回答
- 0 关注
- 745 浏览
添加回答
举报
0/150
提交
取消