diff --git a/app.js b/app.js index e2b7bad..05357e8 100644 --- a/app.js +++ b/app.js @@ -51,10 +51,21 @@ app.configure(function() app.configure('development', function(){ app.use(express.errorHandler({ dumpExceptions: true, showStack: true })); + mongoose.connect('mongodb://localhost/questience'); }); -/* Models */ -mongoose.connect('mongodb://localhost/questience'); +/* DB */ +application.configure('staging', function() { + console.log('Configuring middleware for the production environment.'); + application.use(express.static(__dirname + '/public')); + mongoose.connect('mongodb://heroku_app7204375:5bes70u23r9ucvje0m2frjhb89@ds037447-a.mongolab.com:37447/heroku_app7204375'); +}); + +application.configure('staging', function() { + console.log('Configuring middleware for the production environment.'); + application.use(express.static(__dirname + '/public')); + mongoose.connect('mongodb://heroku_app7204375:5bes70u23r9ucvje0m2frjhb89@ds037447-a.mongolab.com:37447/heroku_app7204375'); +}); /** * Routes diff --git a/package.json b/package.json index 65dab01..8054c2f 100644 --- a/package.json +++ b/package.json @@ -8,11 +8,11 @@ "dependencies": { "express": "3.0.0rc1", "jade": "*", - "mongoose": "~2.7.2", - "mongodb": "~1.1.2", - "stylus": "~0.28.2", - "bootstrap-stylus": "~0.2.1", - "nib": "~0.7.0", + "mongoose": "~2.7.2", + "mongodb": "~1.1.2", + "stylus": "~0.28.2", + "bootstrap-stylus": "~0.2.1", + "nib": "~0.7.0", "handlebars": "~1.0.6", "hbs": "~1.0.5" },