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});我在這段代碼中有幾個(gè)不懂點(diǎn)。。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 回答
- 0 關(guān)注
- 963 瀏覽
添加回答
舉報(bào)
0/150
提交
取消