From f6ff300e61a9a091fdca7c9703a98e188650eefc Mon Sep 17 00:00:00 2001 From: "Glitch (hello-express)" Date: Fri, 20 Dec 2019 21:48:15 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=8B=F0=9F=92=90=20Checkpoint=20./serve?= =?UTF-8?q?r.js:7435365/1328?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) 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