Comparing version
@@ -19,2 +19,3 @@ (function() { | ||
b.ignore('./routes'); | ||
b.ignore('./config'); | ||
b.ignore('socket.io'); | ||
@@ -21,0 +22,0 @@ modelFiles = fs.readdirSync(rootFolder); |
@@ -13,3 +13,8 @@ (function() { | ||
} else { | ||
Invisible.createServer = function(app, rootFolder, cb) { | ||
Invisible.createServer = function(app, rootFolder, config, cb) { | ||
if (typeof config === "function") { | ||
cb = config; | ||
config = void 0; | ||
} | ||
require('./config').customize(config); | ||
Invisible.server = require('http').createServer(app).listen(app.get("port"), function() { | ||
@@ -16,0 +21,0 @@ if (cb != null) { |
(function() { | ||
var ObjectID, cleanQuery, db, mongo, uri, _; | ||
var ObjectID, cleanQuery, config, db, mongo, _; | ||
@@ -8,9 +8,11 @@ mongo = require('mongodb'); | ||
config = require('../config'); | ||
ObjectID = mongo.ObjectID; | ||
uri = global.invisibledb || 'mongodb://127.0.0.1:27017/invisible'; | ||
db = void 0; | ||
mongo.connect(uri, function(err, database) { | ||
console.log("Conecting to " + config.db_uri); | ||
mongo.connect(config.db_uri, function(err, database) { | ||
if (err != null) { | ||
@@ -17,0 +19,0 @@ throw err; |
{ | ||
"name": "invisible", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "DRY models for client and server", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
42651
0.47%547
1.3%