Answer the question
In order to leave comments, you need to log in
Why doesn't the command to output elements to the console work?
node populatedb <your mongodb url>
The script should run to the end, displaying the created elements in the terminal.
I follow the example from https://developer.mozilla.org/ru/docs/Learn/Server... I did everything as it is written there, but I used my own instead of the cloud database, that is, mongodb launched on my pc.
var mongoose = require('mongoose');
var mongoDB = 'mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb';
mongoose.connect(mongoDB);
mongoose.Promise = global.Promise;
var db = mongoose.connection;
db.on('error', console.error.bind(console, 'MongoDB connection error:'));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question