Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdizzy committed Apr 4, 2013
1 parent 17c2d01 commit 5f4a0f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ Looks for a file named database.json in a config directory in the root which con
"password": "floppsy1"
}

It will then import a seed file that you specify on the command line. If the file ends in .json it expects valid json delimited by " marks. If the file ends in .js it will expect a file that exports an object such as an array of documents. E.g.:
module.exports = [{_id: "doc1"}, {_id: "doc2" }]
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ var reset = function(database_name, seed_file, callback) {
database.destroy(function(error, response) {
if (error) {
if (error.error == "not_found") {
createDb(database_name, callback)
create(database_name, seed_file, callback)
}
else {
callback(error, response);
}
}
else {
createDb(database_name, callback);
create(database_name, seed_file,callback);
}
})
}
Expand Down

0 comments on commit 5f4a0f2

Please sign in to comment.