Monoose DeprecationWarning collection.ensureIndex and useNewUrlParser [duplicate]
up vote
0
down vote
favorite
This question already has an answer here:
Avoid “current URL string parser is deprecated” warning by setting useNewUrlParser to true
12 answers
MongoDB mongoose collection.find options Deprecation Warning
4 answers
If you facing problem in mongoose while creating connection with following two warning:
1. DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
2. DeprecationWarning: useNewUrlParser: true
Then you can use use following two line of code to avoid this issue:
mongoose.set('useNewUrlParser',true);
mongoose.set('useCreateIndex',true);
mongoose.connect(dbURI)
.then(connection => {
console.log('Connected to MongoDB DB')
})
.catch(error => {
console.log(error.message)
})
mongodb performance
marked as duplicate by Neil Lunn
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 20 at 20:05
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
up vote
0
down vote
favorite
This question already has an answer here:
Avoid “current URL string parser is deprecated” warning by setting useNewUrlParser to true
12 answers
MongoDB mongoose collection.find options Deprecation Warning
4 answers
If you facing problem in mongoose while creating connection with following two warning:
1. DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
2. DeprecationWarning: useNewUrlParser: true
Then you can use use following two line of code to avoid this issue:
mongoose.set('useNewUrlParser',true);
mongoose.set('useCreateIndex',true);
mongoose.connect(dbURI)
.then(connection => {
console.log('Connected to MongoDB DB')
})
.catch(error => {
console.log(error.message)
})
mongodb performance
marked as duplicate by Neil Lunn
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 20 at 20:05
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This question already has an answer here:
Avoid “current URL string parser is deprecated” warning by setting useNewUrlParser to true
12 answers
MongoDB mongoose collection.find options Deprecation Warning
4 answers
If you facing problem in mongoose while creating connection with following two warning:
1. DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
2. DeprecationWarning: useNewUrlParser: true
Then you can use use following two line of code to avoid this issue:
mongoose.set('useNewUrlParser',true);
mongoose.set('useCreateIndex',true);
mongoose.connect(dbURI)
.then(connection => {
console.log('Connected to MongoDB DB')
})
.catch(error => {
console.log(error.message)
})
mongodb performance
This question already has an answer here:
Avoid “current URL string parser is deprecated” warning by setting useNewUrlParser to true
12 answers
MongoDB mongoose collection.find options Deprecation Warning
4 answers
If you facing problem in mongoose while creating connection with following two warning:
1. DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
2. DeprecationWarning: useNewUrlParser: true
Then you can use use following two line of code to avoid this issue:
mongoose.set('useNewUrlParser',true);
mongoose.set('useCreateIndex',true);
mongoose.connect(dbURI)
.then(connection => {
console.log('Connected to MongoDB DB')
})
.catch(error => {
console.log(error.message)
})
This question already has an answer here:
Avoid “current URL string parser is deprecated” warning by setting useNewUrlParser to true
12 answers
MongoDB mongoose collection.find options Deprecation Warning
4 answers
mongodb performance
mongodb performance
asked Nov 20 at 13:25
Amit Choudhary
11
11
marked as duplicate by Neil Lunn
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 20 at 20:05
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Neil Lunn
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 20 at 20:05
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes