mongoose.connect('mongodb://localhost:27017/go-camp', {
useNewUrlParser: true,
useCreateIndex: true,
useUnifiedTopology: true
});
connection error: MongoParseError: option usecreateindex is not supported
에러가 발생했다.
몽구스 공식문서에는
No More Deprecation Warning Options
useNewUrlParser, useUnifiedTopology, useFindAndModify, and useCreateIndex are no longer supported options. Mongoose 6 always behaves as if useNewUrlParser, useUnifiedTopology, and useCreateIndex are true, and useFindAndModify is false. Please remove these options from your code.
버전6부터 해당 옵션을 사용하지 않아도 된단다.
그러므로 그냥 지워주면 된다!