Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
C4Ai_DR-P
public-service-provider
Commits
f8288c53
Commit
f8288c53
authored
Jul 03, 2020
by
Mahdi Sellami
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add database cleaning at start
parent
fe84967a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
index.js
index.js
+3
-0
No files found.
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
Markdown
is supported
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