How to use the disconnect function from mongoose
Find comprehensive JavaScript mongoose.disconnect code examples handpicked from public code repositorys.
GitHub: team-exor/eiquidus
52 53 54 55 56 57 58 59 60 61
} // exit function used to cleanup before finishing script function exit(exitCode) { // always disconnect mongo connection mongoose.disconnect(); // only remove sync lock if it was created in this session if (!lockCreated || lib.remove_lock(database) == true) { // clean exit with previous exit code
134
53
7
GitHub: mstraughan86/Scry
77 78 79 80 81 82 83 84 85 86
}, () => { console.log(`Mongoose: Connected to ${url + dbname}`); }); }; const disconnect = () => { return mongoose.disconnect() .then((() => console.log('Mongoose: Disconnected.'))); }; const save = (Model, dataArray) => {
10
49
5
mongoose.model is the most popular function in mongoose (2160 examples)