Skip to content
This repository has been archived by the owner on Jun 5, 2019. It is now read-only.

Commit

Permalink
Added production/staging DB to app.js
Browse files Browse the repository at this point in the history
  • Loading branch information
donnielrt committed Sep 1, 2012
1 parent 47117d2 commit fe165b0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
15 changes: 13 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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:[email protected]: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:[email protected]:37447/heroku_app7204375');
});

/**
* Routes
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down

0 comments on commit fe165b0

Please sign in to comment.