Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
C4Ai_DR-P
public-service-provider
Commits
f8288c53
Commit
f8288c53
authored
Jul 03, 2020
by
Mahdi Sellami
Browse files
add database cleaning at start
parent
fe84967a
Changes
1
Hide whitespace changes
Inline
Side-by-side
index.js
View file @
f8288c53
...
...
@@ -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
();
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment