Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // before
- MongoClient.connect(/* 省略 */, function (err, db) {
- if (err) { return console.dir(err); }
- db.collection("users", function (err, connection) {
- /* 省略 */
- });
- /* 省略 */
- });
- // after
- MongoClient.connect(/* 省略 */, function (err, client) { // 1. dbからclientへ変更して下さい。
- var db = client.db('test'); // 2. この行を追加して下さい。
- db.collection("users", function (err, connection) {
- /* 省略 */
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement