How to use the mongojs.connect function in mongojs

To help you get started, we’ve selected a few mongojs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github javascript-playground / express-backbone-library-app / database.js View on Github external
var dbUrl = "library";
var collections = ["books"];

var db = require("mongojs").connect(dbUrl, collections);
module.exports = db;
github likeastore / app / source / utils / dbConnector.js View on Github external
var setDb = function (options) {
	var url = options.url ? options.url : config.connection,
		list = options.collections ? options.collections : collections;

	return mongo.connect(url, list);
};
github likeastore / emails / source / db / dbConnector.js View on Github external
var setDb = function (options) {
	var url = options.url ? options.url : config.connection,
		list = options.collections ? options.collections : collections;

	return mongo.connect(url, list);
};
github likeastore / app / source / db / dbConnector.js View on Github external
var setDb = function (options) {
	var url = options.url ? options.url : config.connection,
		list = options.collections ? options.collections : collections;

	return mongo.connect(url, list);
};
github likeastore / elaster / source / db / index.js View on Github external
module.exports = function (config) {
	var collections = config.collections.map(function (c) {
		return c.name;
	});

	return mongo.connect(config.mongo.connection, collections);
};

mongojs

Easy to use module that implements the mongo api

MIT
Latest version published 4 years ago

Package Health Score

51 / 100
Full package analysis

Popular mongojs functions