Commit f8288c53 authored by Mahdi Sellami's avatar Mahdi Sellami

add database cleaning at start

parent fe84967a
......@@ -29,3 +29,6 @@ var mongoDB = config.get('dbConfig.host');
mongoose.connect(mongoDB, { useNewUrlParser: true, useUnifiedTopology: true });
var db = mongoose.connection;
db.on('error', console.error.bind(console, 'MongoDB connection error:'));
// Delete previous content of the database
db.dropDatabase();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment