diff --git a/server.js b/server.js index 419a9ff..0b9ab3a 100644 --- a/server.js +++ b/server.js @@ -45,16 +45,9 @@ sequelize.authenticate() // populate table with default users function setup(){ Readings.sync({force: true}).then(function() { + Readings.create({ timestamp: new Date(), reading: 30 }); console.log(Readings); - }); - - User.sync({force: true}) // We use 'force: true' in this example to drop the table users if it already exists, and create a new one. You'll most likely want to remove this setting in your own apps - .then(function(){ - // Add the default users to the database - for(var i=0; i