Skip to content

Commit

Permalink
Add database.json configuation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Kunkle committed Dec 13, 2011
1 parent 1500e82 commit b639f8c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
@@ -1,3 +1,2 @@
migrations/
node_modules/
database.json
11 changes: 11 additions & 0 deletions database.json
@@ -0,0 +1,11 @@
{
"development": {
"driver": "sqlite3",
"filename": ":memory:"
},

"test": {
"driver": "sqlite3",
"filename": ":memory:"
}
}
16 changes: 16 additions & 0 deletions lib/config.js
@@ -0,0 +1,16 @@
exports.load = function(path) {
var config = require(path);

for (var env in config) {
exports[env] = config[env];
}

exports.setCurrent = function(env) {
exports.getCurrent = function() {
return exports[env];
}
}

delete exports.load;
};

0 comments on commit b639f8c

Please sign in to comment.