Skip to content

Commit

Permalink
added in model synchronization.
Browse files Browse the repository at this point in the history
  • Loading branch information
hmalik88 committed Nov 3, 2020
1 parent f9d549a commit afc7398
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
const http = require('http');
const models = require('./models');
const app = require('./app');
const port = '3000';
app.set('port', port);
const server = http.createServer(app);

// sync models here
return models.sequelize.sync().then(res => {
server.listen(port);
server.on('error', onError);
server.on('listening', onListening);
})


// event listener for HTTP server error events
Expand Down

0 comments on commit afc7398

Please sign in to comment.