Created
February 12, 2015 20:54
-
-
Save cahlan/c5e1f30964599f80d92e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var Product = require('../models/product'); | |
require('../server');//this makes sure the db is connected | |
exports.up = function(next){ | |
var watch = new Product({ | |
name: 'Rolex Watch' | |
description: 'One of the most expensive, luxurious items around.', | |
price: 3500000, | |
active: true | |
}); | |
watch.save(function(err) { | |
if (err) { | |
console.log(err); | |
next(err); | |
} | |
else { | |
console.log("seed data included"); | |
next(); | |
} | |
}); | |
}; | |
exports.down = function(next){ | |
next(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment