Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to find out if mongoose is connected or not

// test.js
require('./app.js'); // which executes 'mongoose.connect()'

var mongoose = require('mongoose');
console.log(mongoose.connection.readyState);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #mongoose #connected
ADD COMMENT
Topic
Name
6+7 =