Skip to content
This repository has been archived by the owner on Jul 25, 2018. It is now read-only.

Commit

Permalink
Removes a sync(force) call which recreates all tables in the db (#97)
Browse files Browse the repository at this point in the history
* removes a sync(force) call which recreates all tables in the db

* fix sync fix
  • Loading branch information
Henni authored Apr 13, 2017
1 parent 286629c commit 902d609
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,17 @@ var swaggerConfig = {
require('./database.js').connect(null,function (context) {

SwaggerExpress.create(swaggerConfig, function (err, swaggerExpress) {
context.sequelize.sync({force: true}).then(function () {

if (err) {
throw err;
}

// install middleware
swaggerExpress.register(app);

var port = process.env.PORT || 10010;
app.listen(port);
if (err) {
throw err;
}

console.log('Server running at http://127.0.0.1:' + port);
// install middleware
swaggerExpress.register(app);

})
var port = process.env.PORT || 10010;
app.listen(port);

console.log('Server running at http://127.0.0.1:' + port);
});

});
Expand Down

0 comments on commit 902d609

Please sign in to comment.