Skip to content

Commit

Permalink
adding db clients for components initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
picanteverde committed Mar 27, 2013
1 parent bf4b84f commit 26d9b1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
var simple = require("./components/simple/routes.js");

module.exports = {
load: function(app){
load: function(app, dbs){

app.get("/hello", simple.helloWorld);
}
};
Expand Down
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dbs.connect(config.dbs, function(errs, clients){
console.log("Error: db[" + db + "] " + errs[db]);
}
}else{
routes.load(app);
routes.load(app, clients);
app.listen(config.server.port);
console.log("App listening on port: " + config.server.port);
}
Expand Down

0 comments on commit 26d9b1f

Please sign in to comment.