б
Size: a a a
б
AA
AA
IN
d🇳
IN
MZ
MZ
MZ
const mongo = require('mongodb').MongoClient;TypeError: Cannot read property 'close' of undefined
const config = require('./config.json');
mongo.connect(config.URI).then(client => {
// console.log(client);
const db = client.db("INDFLORIST");
const collection = db.collection('API');
return collection.insertOne({name: 'Roger'});
})
.then(function(result) {
console.log(result);
}).then(client => {
client.close();
})
.catch(err => {
console.error("Ошибка: ", err);
});
S
const mongo = require('mongodb').MongoClient;TypeError: Cannot read property 'close' of undefined
const config = require('./config.json');
mongo.connect(config.URI).then(client => {
// console.log(client);
const db = client.db("INDFLORIST");
const collection = db.collection('API');
return collection.insertOne({name: 'Roger'});
})
.then(function(result) {
console.log(result);
}).then(client => {
client.close();
})
.catch(err => {
console.error("Ошибка: ", err);
});
MZ
AA
k
const mongo = require('mongodb').MongoClient;TypeError: Cannot read property 'close' of undefined
const config = require('./config.json');
mongo.connect(config.URI).then(client => {
// console.log(client);
const db = client.db("INDFLORIST");
const collection = db.collection('API');
return collection.insertOne({name: 'Roger'});
})
.then(function(result) {
console.log(result);
}).then(client => {
client.close();
})
.catch(err => {
console.error("Ошибка: ", err);
});
D
DG
МЗ
ИР
ИР