Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
const mongoose = require('mongoose');
class MongoManager {
constructor (config) {
this._config = config;
getMongoUrl() {
return this._config.MONGODB_URI;
connect () {
return mongoose.connect(this.getMongoUrl());
module.exports = MongoManager;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.