File tree Expand file tree Collapse file tree 4 files changed +3
-14
lines changed Expand file tree Collapse file tree 4 files changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,7 @@ const mongoConnectionString = process.env.MONGO_URL;
14
14
const { ObjectId } = mongoose . Types ;
15
15
// Connect to MongoDB
16
16
mongoose . Promise = global . Promise ;
17
- mongoose . connect ( mongoConnectionString , {
18
- useNewUrlParser : true ,
19
- useUnifiedTopology : true
20
- } ) ;
17
+ mongoose . connect ( mongoConnectionString ) ;
21
18
mongoose . set ( 'strictQuery' , true ) ;
22
19
mongoose . connection . on ( 'error' , ( ) => {
23
20
console . error (
Original file line number Diff line number Diff line change @@ -22,8 +22,6 @@ const connectToMongoDB = async () => {
22
22
mongoose . set ( 'strictQuery' , true ) ;
23
23
24
24
await mongoose . connect ( mongoConnectionString , {
25
- useNewUrlParser : true ,
26
- useUnifiedTopology : true ,
27
25
serverSelectionTimeoutMS : 30000 , // 30 seconds timeout
28
26
socketTimeoutMS : 45000 // 45 seconds timeout
29
27
} ) ;
Original file line number Diff line number Diff line change @@ -59,10 +59,7 @@ const headers = { 'User-Agent': 'p5js-web-editor/0.0.1' };
59
59
60
60
const mongoConnectionString = process . env . MONGO_URL ;
61
61
62
- mongoose . connect ( mongoConnectionString , {
63
- useNewUrlParser : true ,
64
- useUnifiedTopology : true
65
- } ) ;
62
+ mongoose . connect ( mongoConnectionString ) ;
66
63
mongoose . set ( 'strictQuery' , true ) ;
67
64
mongoose . connection . on ( 'error' , ( ) => {
68
65
console . error (
Original file line number Diff line number Diff line change @@ -14,10 +14,7 @@ const headers = { 'User-Agent': 'p5js-web-editor/0.0.1' };
14
14
15
15
const mongoConnectionString = process . env . MONGO_URL ;
16
16
17
- mongoose . connect ( mongoConnectionString , {
18
- useNewUrlParser : true ,
19
- useUnifiedTopology : true
20
- } ) ;
17
+ mongoose . connect ( mongoConnectionString ) ;
21
18
mongoose . set ( 'strictQuery' , true ) ;
22
19
mongoose . connection . on ( 'error' , ( ) => {
23
20
console . error (
You can’t perform that action at this time.
0 commit comments