Add to Chrome
✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Як підключитися до бази даних MongoDB у Node.js за допомогою бібліотеки Mongoose?
mongoose.connect('mongodb://127.0.0.1:2700/myapp');
const schema = mongoose.model('Person', { name: String, age: Number });
const schema = mongoose.Schema({ name: String, age: Number });
const Person = mongoose.model({ name: String, age: Number });
const Person = mongoose.Schema({ name: String, age: Number });
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!