summaryrefslogtreecommitdiffstats
path: root/protoype/mydb.js
blob: 4a585806b316b0f82830af1e03841371da4cef1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * db.js
 *
 * database include file
 *
 */

var dburl = 'localhost/nodejs1';
var collections = ['users'];
var db = require('mongojs').connect(dburl, collections);


/* this has to be 'module.exports' so that when this module is require'd the
 * exported object that in this case is 'db' will be a reference instead of an
 * undefined object
 */
module.exports = db;