forked from juice-shop/juice-shop
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
84 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var db = require('./index') | ||
|
||
var reviews = [ | ||
{ product: 1, message: 'One of my favorites!', author: '[email protected]' }, | ||
{ product: 17, message: 'Has a nice flavor!', author: '[email protected]' }, | ||
{ product: 3, message: 'I bought it, would buy again. 5/7', author: '[email protected]' }, | ||
{ product: 14, message: 'Fresh out of a replicator.', author: '[email protected]' }, | ||
{ product: 6, message: 'Fry liked it too.', author: '[email protected]' }, | ||
{ product: 19, message: 'A vital ingredient for a succesful playthrough.', author: '[email protected]' } | ||
] | ||
|
||
module.exports = function datacreator () { | ||
db.reviews.upsert(reviews, {}, function (reviews) { | ||
console.log('Created some reviews!') | ||
console.log('Reviews', reviews) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var minimongo = require('minimongo') | ||
|
||
var LocalDb = minimongo.MemoryDb | ||
|
||
var db = new LocalDb() | ||
db.addCollection('reviews') | ||
|
||
module.exports = db |
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.